[vlc-commits] [Git][videolan/vlc][3.0.x] demux: asf: fix content description fields reading same offset
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Fri Apr 24 12:13:16 UTC 2026
Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC
Commits:
1f5e5604 by Felix Paul Kühne at 2026-04-24T13:53:16+02:00
demux: asf: fix content description fields reading same offset
Regression from cddfefc80f. Fixes #26217
(cherry picked from commit b9ef042036e636a82983022f1714bf95af92ef6b)
- - - - -
1 changed file:
- modules/demux/asf/libasf.c
Changes:
=====================================
modules/demux/asf/libasf.c
=====================================
@@ -744,11 +744,10 @@ error:
return VLC_EGENERIC;
}
-static inline char *get_wstring( const uint8_t *p_data, size_t i_size )
+static inline char *get_wstring( const uint8_t **pp_data, size_t i_size )
{
- char *psz_str = FromCharset( "UTF-16LE", p_data, i_size );
- if( psz_str )
- p_data += i_size;
+ char *psz_str = FromCharset( "UTF-16LE", *pp_data, i_size );
+ *pp_data += i_size;
return psz_str;
}
@@ -778,11 +777,11 @@ static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj)
if( !ASF_HAVE( i_title+i_artist+i_copyright+i_description+i_rating ) )
return VLC_EGENERIC;
- p_cd->psz_title = get_wstring( p_data, i_title );
- p_cd->psz_artist = get_wstring( p_data, i_artist );
- p_cd->psz_copyright = get_wstring( p_data, i_copyright );
- p_cd->psz_description = get_wstring( p_data, i_description );
- p_cd->psz_rating = get_wstring( p_data, i_rating );
+ p_cd->psz_title = get_wstring( &p_data, i_title );
+ p_cd->psz_artist = get_wstring( &p_data, i_artist );
+ p_cd->psz_copyright = get_wstring( &p_data, i_copyright );
+ p_cd->psz_description = get_wstring( &p_data, i_description );
+ p_cd->psz_rating = get_wstring( &p_data, i_rating );
#ifdef ASF_DEBUG
msg_Dbg( s,
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1f5e56045d0a39b6b3283d47b6c6f0970e07baaf
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1f5e56045d0a39b6b3283d47b6c6f0970e07baaf
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list