summaryrefslogtreecommitdiff
path: root/x11/gtk2/patches/patch-ad
blob: 2396ce4d1da3d26a8a2b848c99a4a46772e69b0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
$NetBSD: patch-ad,v 1.7 2004/05/19 12:46:10 wiz Exp $

--- gdk-pixbuf/io-pnm.c.orig	2004-01-07 01:26:58.000000000 +0100
+++ gdk-pixbuf/io-pnm.c
@@ -237,7 +237,7 @@ pnm_read_next_value (PnmIOBuffer *inbuf,
 	*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 */