Description: Autogenerated patch header for a single-debian-patch file.
 The delta against upstream is either kept as a single patch, or maintained
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
Forwarded: not-needed

---
--- djvulibre-3.5.29.orig/libdjvu/GString.h
+++ djvulibre-3.5.29/libdjvu/GString.h
@@ -136,8 +136,8 @@ typedef unsigned __int32 uint32_t;
 typedef unsigned __int16 uint16_t;
 # else
 # pragma message("Please verify defs for uint32_t and uint16_t")
-typedef unsigned int   uint32_t // verify
-typedef unsigned short uint16_t // verify
+typedef unsigned int   uint32_t; // verify
+typedef unsigned short uint16_t; // verify
 # endif
 #endif
 
--- djvulibre-3.5.29.orig/libdjvu/IW44EncodeCodec.cpp
+++ djvulibre-3.5.29/libdjvu/IW44EncodeCodec.cpp
@@ -1424,7 +1424,10 @@ IWBitmap::Encode::init(const GBitmap &bm
   int h = bm.rows();
   int g = bm.get_grays()-1;
   signed char *buffer;
-  GPBuffer<signed char> gbuffer(buffer,w*h);
+  size_t sz = w * h;
+  if (sz == 0 || g <= 0 || sz / (size_t)w != (size_t)h)
+    G_THROW("IW44Image: inconsistent image size (corrupted file?)");
+  GPBuffer<signed char> gbuffer(buffer,sz);
   // Prepare gray level conversion table
   signed char  bconv[256];
   for (i=0; i<256; i++)
