summaryrefslogtreecommitdiff
path: root/pcr/kompozer/kompozer-libpng15.patch
blob: f236e402a74efc513af8a7b716618fbfa9fbe4a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
diff -urp mozilla.orig/modules/libpr0n/decoders/png/nsPNGDecoder.cpp mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp
--- mozilla.orig/modules/libpr0n/decoders/png/nsPNGDecoder.cpp	2011-11-14 21:55:42.513856274 +0000
+++ modules/libpr0n/decoders/png/nsPNGDecoder.cpp	2011-11-14 22:15:35.899962674 +0000
@@ -171,7 +171,7 @@ static NS_METHOD ReadDataOut(nsIInputStr
   }
 
   // we need to do the setjmp here otherwise bad things will happen
-  if (setjmp(decoder->mPNG->jmpbuf)) {
+  if (setjmp (png_jmpbuf(decoder->mPNG))) {
     png_destroy_read_struct(&decoder->mPNG, &decoder->mInfo, NULL);
 
     decoder->mError = PR_TRUE;
@@ -227,7 +227,7 @@ info_callback(png_structp png_ptr, png_i
   if (width > MOZ_PNG_MAX_DIMENSION || height > MOZ_PNG_MAX_DIMENSION) {
     nsPNGDecoder *decoder = NS_STATIC_CAST(nsPNGDecoder*,
                                            png_get_progressive_ptr(png_ptr));
-    longjmp(decoder->mPNG->jmpbuf, 1);
+    longjmp(png_jmpbuf(decoder->mPNG), 1);
   }
 #undef MOZ_PNG_MAX_DIMENSION
 
@@ -307,7 +307,7 @@ info_callback(png_structp png_ptr, png_i
 
   decoder->mImage = do_CreateInstance("@mozilla.org/image/container;1");
   if (!decoder->mImage)
-    longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY
+    longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY
 
   decoder->mImageLoad->SetImage(decoder->mImage);
 
@@ -319,7 +319,7 @@ info_callback(png_structp png_ptr, png_i
 
   decoder->mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
   if (!decoder->mFrame)
-    longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY
+    longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY
 
   gfx_format format;
 
@@ -341,7 +341,7 @@ info_callback(png_structp png_ptr, png_i
   // then initalize the frame and append it to the container
   nsresult rv = decoder->mFrame->Init(0, 0, width, height, format, 24);
   if (NS_FAILED(rv))
-    longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY
+    longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY
 
   decoder->mImage->AppendFrame(decoder->mFrame);
 
@@ -362,7 +362,7 @@ info_callback(png_structp png_ptr, png_i
       decoder->ibpr = bpr;
     decoder->interlacebuf = (PRUint8 *)nsMemory::Alloc(decoder->ibpr*height);
     if (!decoder->interlacebuf) {
-      longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY
+      longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY
     }            
   }
 
@@ -555,7 +555,7 @@ void
 error_callback(png_structp png_ptr, png_const_charp error_msg)
 {
   PR_LOG(gPNGLog, PR_LOG_ERROR, ("libpng error: %s\n", error_msg));
-  longjmp(png_ptr->jmpbuf, 1);
+  longjmp(png_jmpbuf(png_ptr), 1);
 }