[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Uncompressing: bug found.



I'll send this through the normal bug-report thing, but I think I made
enough noise to mail again...

The problem is in these lines (620-623) in inflater.ss:

	(unless (= n (bitwise-and bb #xffff))
	  (error 'inflate "error in compressed data")
	  (return #f)) ; /* error in compressed data */

I got the C sources, and this is what this is supposed to do:

  if (n != (unsigned)((~b) & 0xffff))
    return 1;                   /* error in compressed data */

So the above lines should change to:

	(unless (= n (bitwise-and (bitwise-not bb) #xffff))
	  (error 'inflate "error in compressed data")
	  (return #f)) ; /* error in compressed data */

... all this shows how good it was to decide to include the same
comments etc, plus I was lucky to run into something so easily
find-able, I just wonder how come this didn't pop up earlier.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
         http://www.cs.cornell.edu/eli/meaning.html        Maze is Life!