[vlc-commits] [Git][videolan/vlc][master] preparser: fix crash when artwork title is null
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Mar 12 11:29:39 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
cddb7dad by Raiyan Aftab Ansari at 2026-03-12T10:19:48+00:00
preparser: fix crash when artwork title is null
This adds a safety check in ArtCacheGetDirPath to prevent a segmentation fault when processing attachment:// artwork URLs that are missing title metadata.
- - - - -
1 changed file:
- src/preparser/art.c
Changes:
=====================================
src/preparser/art.c
=====================================
@@ -101,7 +101,7 @@ static char* ArtCacheGetDirPath( const char *psz_arturl, const char *psz_artist,
vlc_hash_md5_t md5;
vlc_hash_md5_Init( &md5 );
vlc_hash_md5_Update( &md5, psz_arturl, strlen( psz_arturl ) );
- if( !strncmp( psz_arturl, "attachment://", 13 ) )
+ if( !strncmp( psz_arturl, "attachment://", 13 ) && psz_title != NULL )
vlc_hash_md5_Update( &md5, psz_title, strlen( psz_title ) );
vlc_hash_FinishHex( &md5, psz_arturl_sanitized );
if( asprintf( &psz_dir, "%s" DIR_SEP "art" DIR_SEP "arturl" DIR_SEP
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cddb7dadf0259e6221998e4055f49ddacbdf2057
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cddb7dadf0259e6221998e4055f49ddacbdf2057
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list