forked from mirrors/nixpkgs
6203fa41f7
svn path=/nixpkgs/trunk/; revision=9633
61 lines
1.6 KiB
Diff
61 lines
1.6 KiB
Diff
diff -ur poppler-0.6.1/goo/gmem.cc poppler-0.6.1-patched/goo/gmem.cc
|
|
--- poppler-0.6.1/goo/gmem.cc 2007-10-12 13:34:49.000000000 +0200
|
|
+++ poppler-0.6.1-patched/goo/gmem.cc 2007-11-06 16:17:41.290632269 +0100
|
|
@@ -60,7 +60,7 @@
|
|
}
|
|
size1 = gMemDataSize(size);
|
|
if (!(mem = (char *)malloc(size1 + gMemHdrSize + gMemTrlSize))) {
|
|
-#if USE_EXCEPTIONS
|
|
+#ifdef USE_EXCEPTIONS
|
|
throw GMemException();
|
|
#else
|
|
fprintf(stderr, "Out of memory\n");
|
|
@@ -95,7 +95,7 @@
|
|
return NULL;
|
|
}
|
|
if (!(p = malloc(size))) {
|
|
-#if USE_EXCEPTIONS
|
|
+#ifdef USE_EXCEPTIONS
|
|
throw GMemException();
|
|
#else
|
|
fprintf(stderr, "Out of memory\n");
|
|
@@ -143,7 +143,7 @@
|
|
q = malloc(size);
|
|
}
|
|
if (!q) {
|
|
-#if USE_EXCEPTIONS
|
|
+#ifdef USE_EXCEPTIONS
|
|
throw GMemException();
|
|
#else
|
|
fprintf(stderr, "Out of memory\n");
|
|
@@ -162,7 +162,7 @@
|
|
}
|
|
n = nObjs * objSize;
|
|
if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
|
|
-#if USE_EXCEPTIONS
|
|
+#ifdef USE_EXCEPTIONS
|
|
throw GMemException();
|
|
#else
|
|
fprintf(stderr, "Bogus memory allocation size\n");
|
|
@@ -183,7 +183,7 @@
|
|
}
|
|
n = nObjs * objSize;
|
|
if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
|
|
-#if USE_EXCEPTIONS
|
|
+#ifdef USE_EXCEPTIONS
|
|
throw GMemException();
|
|
#else
|
|
fprintf(stderr, "Bogus memory allocation size\n");
|
|
diff -ur poppler-0.6.1/goo/gmem.h poppler-0.6.1-patched/goo/gmem.h
|
|
--- poppler-0.6.1/goo/gmem.h 2007-09-17 20:37:39.000000000 +0200
|
|
+++ poppler-0.6.1-patched/goo/gmem.h 2007-11-06 16:17:46.606925527 +0100
|
|
@@ -12,7 +12,7 @@
|
|
#include <stdio.h>
|
|
#include <poppler/poppler-config.h>
|
|
|
|
-#if USE_EXCEPTIONS
|
|
+#ifdef USE_EXCEPTIONS
|
|
|
|
class GMemException {
|
|
public:
|