[vlc-commits] dynamicoverlay: fix memory corruption
Rémi Denis-Courmont
git at videolan.org
Mon Feb 26 19:50:20 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb 26 20:43:03 2018 +0200| [6f14081af7325d334a53126c4eea52bc30fc08a0] | committer: Rémi Denis-Courmont
dynamicoverlay: fix memory corruption
Font alpha is 8-bits, not 32-bits.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f14081af7325d334a53126c4eea52bc30fc08a0
---
modules/spu/dynamicoverlay/dynamicoverlay_commands.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
index 2bd82921c0..ff370a0aac 100644
--- a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
+++ b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
@@ -238,8 +238,12 @@ static int parser_SetTextAlpha( char *psz_command, char *psz_end,
skip_space( &psz_command );
if( isdigit( (unsigned char)*psz_command ) )
{
- if( parse_digit( &psz_command, &p_params->fontstyle.i_font_alpha ) == VLC_EGENERIC )
+ int32_t value;
+
+ if( parse_digit( &psz_command, &value ) == VLC_EGENERIC )
return VLC_EGENERIC;
+
+ p_params->fontstyle.i_font_alpha = value;
}
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list