diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2005-02-21 20:52:32 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu.herrb@laas.fr> | 2005-02-21 20:52:32 +0000 |
commit | 639b3598cd0e7214010248efb62b75ef85a8e5c5 (patch) | |
tree | 420203c4179ad722021b31e0c5df14db469178f2 /src/scan.c | |
parent | f1908d7ee5e2d2d44db2116b3c88213da9dfb854 (diff) | |
download | xorg-lib-libXpm-sco_port_update.tar.gz |
Avoid inifite loops. From Chris Gilbert in bug #1920.sco_port_update-baseXORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_1sco_port_update
Diffstat (limited to 'src/scan.c')
-rw-r--r-- | src/scan.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -621,8 +621,8 @@ GetImagePixels(image, width, height, pmap) char *dst; unsigned int *iptr; char *data; - unsigned int x, y, i; - int bits, depth, ibu, ibpp, offset; + unsigned int x, y; + int bits, depth, ibu, ibpp, offset, i; unsigned long lbt; Pixel pixel, px; @@ -633,6 +633,9 @@ GetImagePixels(image, width, height, pmap) ibpp = image->bits_per_pixel; offset = image->xoffset; + if (image->bitmap_unit < 0) + return (XpmNoMemory); + if ((image->bits_per_pixel | image->depth) == 1) { ibu = image->bitmap_unit; for (y = 0; y < height; y++) |