>>>>> "Jos�" == Jos� Ab�lio Oliveira Matos <[EMAIL PROTECTED]> writes:

Jos�> On Thursday 12 September 2002 15:50, Jean-Marc Lasgouttes wrote:
>> >>>>> "Jos�" == Jos� Ab�lio Oliveira Matos
>> <[EMAIL PROTECTED]> >>>>> writes:
>> 
>> Jos�> On Thursday 12 September 2002 15:12, Jean-Marc Lasgouttes wrote:
>> >> And the file contains the string JFIF, right?
>> 
>> Jos�> Yes, but only in position 0x430 (I had to use a hex editor to
>> Jos�> see it. :-)
>> 
>> Does the following completely untested patch help?

Jos�>   Yes, it does.

Good.

>> Note that it only fixes your case, and that the function should be
>> completely rewritten to be table-driven to fix all the questionable
>> uses of contains().

Jos�>   Should that be done for 1.2.2?

I'd like first to see this for 1.3.0 and check that it actually works.
It is not very difficult to do, but has to be checked on files for all
formats (yuck). Moreover, the current code reads the files line by
line as if it were a text file, which can cause problems if the binary
file contains some misplaced \n. And then some formats search on the
first line and others do not, and I do not know why :(

My conclusion is: this code needs a serious rewrite, and I would like
to release 1.2.2 only with safe and critical fixes. We could of course
apply the patch I sent, but it will probably only fix the problem that
you colleague has on this particular file :)

JMarc

Reply via email to