Don't read over the end of the buffer if '#' appears at the very end.
2005-02-15 Matthias Clasen <mclasen@redhat.com> * io-pnm.c (pnm_skip_whitespace): Don't read over the end of the buffer if '#' appears at the very end. (#167141, Doug Morgan)
This commit is contained in:
committed by
Matthias Clasen
parent
3738d69b43
commit
274a496fa6
@@ -1,3 +1,8 @@
|
||||
2005-02-15 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-pnm.c (pnm_skip_whitespace): Don't read over the end of
|
||||
the buffer if '#' appears at the very end. (#167141, Doug Morgan)
|
||||
|
||||
2005-02-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-pnm.c (pnm_read_next_value): Pass in the max number
|
||||
|
||||
@@ -192,7 +192,7 @@ pnm_skip_whitespace (PnmIOBuffer *inbuf, GError **error)
|
||||
for ( ; *inptr != '\n' && inptr < inend; inptr++)
|
||||
;
|
||||
|
||||
if ( *inptr != '\n' ) {
|
||||
if ( inptr == inend || *inptr != '\n' ) {
|
||||
/* couldn't read whole comment */
|
||||
return PNM_SUSPEND;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user