From a1db3492eac758c25921a27bab5b1fe0e7e1c45c Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:10:28 +0200
Subject: [PATCH 12/17] wpg: size_t is unsigned; can never be less than 0

---
 scribus/third_party/wpg/WPGStreamImplementation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scribus/third_party/wpg/WPGStreamImplementation.cpp b/scribus/third_party/wpg/WPGStreamImplementation.cpp
index 308bf94..4d783f7 100644
--- a/scribus/third_party/wpg/WPGStreamImplementation.cpp
+++ b/scribus/third_party/wpg/WPGStreamImplementation.cpp
@@ -325,7 +325,7 @@ const uint8_t *WPGMemoryStream::read(size_t numBytes, size_t &numBytesRead)
 	if (0 == numBytes)
 		return 0;
 
-	if (numBytes < 0 || atEOS() || numBytes > (std::numeric_limits<unsigned long>::max)()/2)
+	if (atEOS() || numBytes > (std::numeric_limits<unsigned long>::max)()/2)
 		return 0;
 
 	unsigned long curpos = d->buffer.tellg();
-- 
2.1.0

