projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
801778b
)
Add two extra needed bounds checks
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Wed, 31 Jan 2007 10:29:58 +0000
(10:29 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Wed, 31 Jan 2007 10:29:58 +0000
(10:29 +0000)
Originally committed as revision 7777 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/lzo.c
patch
|
blob
|
history
diff --git
a/libavcodec/lzo.c
b/libavcodec/lzo.c
index
54a34c2
..
5fd1f4c
100644
(file)
--- a/
libavcodec/lzo.c
+++ b/
libavcodec/lzo.c
@@
-182,6
+182,8
@@
int lzo1x_decode(void *out, int *outlen, void *in, int *inlen) {
x = GETB(c);
if (x < 16) c.error |= LZO_ERROR;
}
+ if (c.in > c.in_end)
+ c.error |= LZO_INPUT_DEPLETED;
while (!c.error) {
int cnt, back;
if (x > 15) {
@@
-209,6
+211,10
@@
int lzo1x_decode(void *out, int *outlen, void *in, int *inlen) {
cnt = get_len(&c, x, 15);
copy(&c, cnt + 3);
x = GETB(c);
+ if (c.in > c.in_end) {
+ c.error |= LZO_INPUT_DEPLETED;
+ continue;
+ }
if (x >> 4)
continue;
cnt = 1;