mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
ba1248c3ca
fix out of bound error, introduced in jumbo2 patch Reported by: naddy (Christian Weisgerber) Submitted by: Patrick Keshishian Obtained from: openbsd Feature safe: yes
22 lines
799 B
C
22 lines
799 B
C
$OpenBSD$
|
|
--- xvjpeg.c.orig Fri Aug 28 13:41:30 2009
|
|
+++ xvjpeg.c Fri Aug 28 18:58:46 2009
|
|
@@ -696,7 +696,7 @@ L2:
|
|
if ((cmy = *q++ - k) < 0) cmy = 0; *p++ = cmy; /* R */
|
|
if ((cmy = *q++ - k) < 0) cmy = 0; *p++ = cmy; /* G */
|
|
if ((cmy = *q++ - k) < 0) cmy = 0; *p++ = cmy; /* B */
|
|
- } while (++q <= pic_end);
|
|
+ } while (++q < pic_end);
|
|
}
|
|
else { /* assume normal data */
|
|
register byte *q = pic;
|
|
@@ -707,7 +707,7 @@ L2:
|
|
if ((cmy = k - *q++) < 0) cmy = 0; *p++ = cmy; /* R */
|
|
if ((cmy = k - *q++) < 0) cmy = 0; *p++ = cmy; /* G */
|
|
if ((cmy = k - *q++) < 0) cmy = 0; *p++ = cmy; /* B */
|
|
- } while (++q <= pic_end);
|
|
+ } while (++q < pic_end);
|
|
}
|
|
pic = realloc(pic,p-pic); /* Release extra storage */
|
|
}
|