sanm: fix off by 1 error in draw_glyph()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 19:26:05 +0000 (21:26 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 22:08:28 +0000 (00:08 +0200)
This fix changes nothing as nothing passed a so large value

Fixes CID733785
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/sanm.c

index 2a04706..c39d269 100644 (file)
@@ -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;
     }