Mercurial > mplayer.hg
comparison sub/sub.c @ 35220:349f03d4c033
Fix potential out-of-bounds write due to breaking
out only of the inner loop when reaching the limit.
author | reimar |
---|---|
date | Wed, 31 Oct 2012 20:11:49 +0000 |
parents | ff81a1db421e |
children | 317eee237d0f |
comparison
equal
deleted
inserted
replaced
35219:f46a80e9fe77 | 35220:349f03d4c033 |
---|---|
940 c = tmp_ott->text[counter]; | 940 c = tmp_ott->text[counter]; |
941 render_one_glyph(sub_font, c); | 941 render_one_glyph(sub_font, c); |
942 obj->params.subtitle.utbl[utblc++] = c; | 942 obj->params.subtitle.utbl[utblc++] = c; |
943 k++; | 943 k++; |
944 } | 944 } |
945 if (utblc > MAX_UCS) | |
946 break; | |
945 obj->params.subtitle.utbl[utblc++] = ' '; | 947 obj->params.subtitle.utbl[utblc++] = ' '; |
946 } | 948 } |
947 obj->params.subtitle.utbl[utblc - 1] = 0; | 949 obj->params.subtitle.utbl[utblc - 1] = 0; |
948 obj->y -= sub_font->height; | 950 obj->y -= sub_font->height; |
949 } | 951 } |