Changeset 102

Show
Ignore:
Timestamp:
10.12.2006 15:01:12 (2 years ago)
Author:
decoder
Message:

Small fix, check GIF file size twice, before and after giffix was called.
Prevents DoS attacks by feeding chopped gif files to the plugin.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/devel/FuzzyOcr.pm

    r101 r102  
    429429                    } 
    430430                } 
     431            } 
     432 
     433            if (defined($conf->{focr_max_size_gif}) and (((stat($tfile))[7]) > $conf->{focr_max_size_gif})) { 
     434                infolog("Fixed GIF file size ($$pic{fsize}) exceeds maximum file size for this format, skipping..."); 
     435                next; 
    431436            } 
    432437