[PATCH libXpm] Remove an erroneous check which causes

Jeremy Huddleston jeremyhu at apple.com
Fri Oct 7 18:09:41 PDT 2011


Fixes regression introduced by: 50986a34f231fbc7a4b62466bd89bd4ae4027d2e
https://bugs.freedesktop.org/show_bug.cgi?id=26589

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
---
 src/CrBufFrI.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/CrBufFrI.c b/src/CrBufFrI.c
index 398c645..53aa05c 100644
--- a/src/CrBufFrI.c
+++ b/src/CrBufFrI.c
@@ -312,8 +312,7 @@ WriteColors(
 	strcpy(s, "\",\n");
 	l = s + 3 - buf;
 	if( *data_size                   >= UINT_MAX-l ||
-	    *data_size + l               <= *used_size ||
-	   (*data_size + l - *used_size) <= sizeof(buf))
+	    *data_size + l               <= *used_size)
 		return(XpmNoMemory);
 	s = (char *) XpmRealloc(*dataptr, *data_size + l);
 	if (!s)
-- 
1.7.6.1




More information about the xorg-devel mailing list