Comment 11 for bug 316017

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Mike, thanks for your feedback!

> 1) I don't think it is possible for (i < tiff) to ever occur in the code. Is it?

I was thinking "offset" could even be negative, but I didn't really check the signedness and types of the functions and variables involved. I don't remember any longer if I got a negative in my own gdb testing.

> 2) I think "i>readsize" should actually be "i>=readsize". Right?

Yes, that would be consistent with the while(i<readsize) in the code above. And I guess to be really precise, a real tag sequence would need a certain size so it would already be useless if i>(readsize-certainsize). But given the randomness of "offset" these would be corner cases.