[vlc-commits] [Git][videolan/vlc][master] demux: asf: fix content description fields reading same offset
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Tue Apr 21 09:59:06 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
b9ef0420 by Felix Paul Kühne at 2026-04-21T11:15:00+02:00
demux: asf: fix content description fields reading same offset
Regression from cddfefc80f. Fixes #26217
- - - - -
1 changed file:
- modules/demux/asf/libasf.c
Changes:
=====================================
modules/demux/asf/libasf.c
=====================================
@@ -745,11 +745,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;
}
@@ -779,11 +778,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/b9ef042036e636a82983022f1714bf95af92ef6b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b9ef042036e636a82983022f1714bf95af92ef6b
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list