Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/sgidec.c')
-rw-r--r--libavcodec/sgidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index a32620be78..4f7f8ac9f1 100644
--- 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) {