Don't read integers partially. (#142584, Kouichirou Hiratsuka)

Sun May 16 22:55:49 2004  Matthias Clasen  <maclas@gmx.de>

	* io-pnm.c (pnm_read_next_value): Don't read integers
	partially.  (#142584, Kouichirou Hiratsuka)
This commit is contained in:
Matthias Clasen
2004-05-17 03:07:23 +00:00
committed by Matthias Clasen
parent cd396b22ae
commit 0e7ede9036
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
Sun May 16 22:55:49 2004 Matthias Clasen <maclas@gmx.de>
* io-pnm.c (pnm_read_next_value): Don't read integers
partially. (#142584, Kouichirou Hiratsuka)
2004-05-10 Matthias Clasen <mclasen@redhat.com>
* pixops/timescale.c:

View File

@@ -237,7 +237,7 @@ pnm_read_next_value (PnmIOBuffer *inbuf, guint *value, GError **error)
*word = '\0';
/* hmmm, there must be more data to this 'word' */
if (!g_ascii_isspace (*p) && (*p != '#') && (p - inptr < 128))
if (p == inend || (!g_ascii_isspace (*p) && (*p != '#') && (p - inptr < 128)))
return PNM_SUSPEND;
/* get the value */