[FFmpeg-cvslog] sanm: fix off by 1 error in draw_glyph()
Michael Niedermayer
git at videolan.org
Fri Oct 12 00:26:42 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 11 21:26:05 2012 +0200| [1b5069aa41ce3c0ce21e3fbea7ef14bac403e48e] | committer: Michael Niedermayer
sanm: fix off by 1 error in draw_glyph()
This fix changes nothing as nothing passed a so large value
Fixes CID733785
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b5069aa41ce3c0ce21e3fbea7ef14bac403e48e
---
libavcodec/sanm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index 2a04706..c39d269 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -802,7 +802,7 @@ static int draw_glyph(SANMVideoContext *ctx, uint16_t *dst, int index, uint16_t
uint16_t colors[2] = { fg_color, bg_color };
int x, y;
- if (index > NGLYPHS) {
+ if (index >= NGLYPHS) {
av_log(ctx->avctx, AV_LOG_ERROR, "ignoring nonexistent glyph #%u\n", index);
return AVERROR_INVALIDDATA;
}
More information about the ffmpeg-cvslog
mailing list