diff options
author | jstebbins <[email protected]> | 2010-06-02 05:42:59 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-06-02 05:42:59 +0000 |
commit | 4b79ae123ec8534c2e72654d28bc36c95bd28f1a (patch) | |
tree | 341b74b31ff10bdeaabe1c612e201a26a23caffc | |
parent | a3e13339d4479c33d5e221e6b6d4dd8ab60e6504 (diff) |
fix potential buffer overrun
and a few compile time warnings about sign differences
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3345 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/decssasub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libhb/decssasub.c b/libhb/decssasub.c index e4ff0dc59..569708eb6 100644 --- a/libhb/decssasub.c +++ b/libhb/decssasub.c @@ -33,7 +33,7 @@ typedef enum { sec * 1000L +\ centi * 10L ) ) -static StyleSet ssa_parse_style_override( char *pos, StyleSet prevStyles ) +static StyleSet ssa_parse_style_override( uint8_t *pos, StyleSet prevStyles ) { StyleSet nextStyles = prevStyles; for (;;) @@ -72,7 +72,7 @@ static StyleSet ssa_parse_style_override( char *pos, StyleSet prevStyles ) } static void ssa_append_html_tags_for_style_change( - char **dst, StyleSet prevStyles, StyleSet nextStyles ) + uint8_t **dst, StyleSet prevStyles, StyleSet nextStyles ) { #define APPEND(str) { \ char *src = str; \ @@ -149,7 +149,7 @@ static hb_buffer_t *ssa_decode_to_utf8( hb_buffer_t *in ) } } - int maxOutputSize = (end - pos) + ((numStyleOverrides + 1) * MAX_OVERHEAD_PER_OVERRIDE); + int maxOutputSize = (end - textFieldPos) + ((numStyleOverrides + 1) * MAX_OVERHEAD_PER_OVERRIDE); hb_buffer_t *out = hb_buffer_init( maxOutputSize ); if ( out == NULL ) return NULL; |