OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
997e2b5
)
sgidec: safer check for buffer overflow
author
Paul B Mahol
<onemda@gmail.com>
Fri, 26 Jul 2013 21:53:54 +0000
(21:53 +0000)
committer
Paul B Mahol
<onemda@gmail.com>
Sat, 27 Jul 2013 12:00:25 +0000
(12:00 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/sgidec.c
patch
|
blob
|
history
diff --git
a/libavcodec/sgidec.c
b/libavcodec/sgidec.c
index
a32620b
..
4f7f8ac
100644
(file)
--- a/
libavcodec/sgidec.c
+++ b/
libavcodec/sgidec.c
@@
-58,7
+58,7
@@
static int expand_rle_row(SgiState *s, uint8_t *out_buf,
}
/* Check for buffer overflow. */
- if (out_
buf + pixelstride * (count - 1) >= out_end
)
+ if (out_
end - out_buf <= pixelstride * (count - 1)
)
return AVERROR_INVALIDDATA;
if (pixel & 0x80) {