Fix out-of-bound access. (#440918, Matthias Kilian)

2007-06-12  Behdad Esfahbod  <behdad@gnome.org>

        * io-pnm.c (explode_bitmap_into_buf): Fix out-of-bound access.
        (#440918, Matthias Kilian)


svn path=/trunk/; revision=18110
This commit is contained in:
Behdad Esfahbod 2007-06-12 05:40:13 +00:00 committed by Behdad Esfahbod
parent 1adaeba11f
commit d6061b54e2
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-06-12 Behdad Esfahbod <behdad@gnome.org>
* io-pnm.c (explode_bitmap_into_buf): Fix out-of-bound access.
(#440918, Matthias Kilian)
2007-06-06 Matthias Clasen <mclasen@redhat.com>
* === Released 2.11.2 ===

View File

@ -133,7 +133,7 @@ explode_bitmap_into_buf (PnmLoaderContext *context)
to -= 3;
bit++;
if (bit > 7) {
if (bit > 7 && x > 0) {
from--;
data = from[0];
bit = 0;