summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/sdl_image/SDL_image-IMG_lbm.patch
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2008-12-01 23:48:10 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2008-12-01 23:48:10 (GMT)
commit575bd0829fce6f7582aefca086e1894b63812ef8 (patch)
tree1b66d798131ebd448034b30a2d7d6111aabf4c52 /abs/core-testing/sdl_image/SDL_image-IMG_lbm.patch
parent466412d4bdf5beb0645eced2d064df5e15f9b76b (diff)
downloadlinhes_pkgbuild-575bd0829fce6f7582aefca086e1894b63812ef8.zip
linhes_pkgbuild-575bd0829fce6f7582aefca086e1894b63812ef8.tar.gz
linhes_pkgbuild-575bd0829fce6f7582aefca086e1894b63812ef8.tar.bz2
Emulators and deps.
Signed-off-by: Cecil Hugh Watson <knoppmyth@gmail.com>
Diffstat (limited to 'abs/core-testing/sdl_image/SDL_image-IMG_lbm.patch')
-rw-r--r--abs/core-testing/sdl_image/SDL_image-IMG_lbm.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/abs/core-testing/sdl_image/SDL_image-IMG_lbm.patch b/abs/core-testing/sdl_image/SDL_image-IMG_lbm.patch
new file mode 100644
index 0000000..cc4a29b
--- /dev/null
+++ b/abs/core-testing/sdl_image/SDL_image-IMG_lbm.patch
@@ -0,0 +1,28 @@
+--- trunk/SDL_image/IMG_lbm.c 2007/07/20 04:37:11 3341
++++ trunk/SDL_image/IMG_lbm.c 2008/01/03 20:05:34 3521
+@@ -28,6 +28,7 @@
+ EHB and HAM (specific Amiga graphic chip modes) support added by Marc Le Douarain
+ (http://www.multimania.com/mavati) in December 2003.
+ Stencil and colorkey fixes by David Raulo (david.raulo AT free DOT fr) in February 2004.
++ Buffer overflow fix in RLE decompression by David Raulo in January 2008.
+ */
+
+ #include <stdio.h>
+@@ -328,7 +329,7 @@
+ count ^= 0xFF;
+ count += 2; /* now it */
+
+- if ( !SDL_RWread( src, &color, 1, 1 ) )
++ if ( ( count > remainingbytes ) || !SDL_RWread( src, &color, 1, 1 ) )
+ {
+ error="error reading BODY chunk";
+ goto done;
+@@ -339,7 +340,7 @@
+ {
+ ++count;
+
+- if ( !SDL_RWread( src, ptr, count, 1 ) )
++ if ( ( count > remainingbytes ) || !SDL_RWread( src, ptr, count, 1 ) )
+ {
+ error="error reading BODY chunk";
+ goto done;