Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
ec9adb00 by Abderhman Gamal at 2026-01-19T20:42:22+00:00
webservices: acoustid: fix null dereference in parse_artists
json_get_array() can return NULL if the key is not found. passing NULL
to parse_artists() caused a crash because it accessed artists->size
without checking.
This patch adds a check for NULL in parse_artists() to avoid the crash.
Fixes #29361
Signed-off-by: Abderhman Gamal <[email protected]>
- - - - -
1 changed file:
- modules/misc/webservices/acoustid.c
Changes:
=====================================
modules/misc/webservices/acoustid.c
=====================================
@@ -44,6 +44,7 @@ void acoustid_result_release( acoustid_result_t * r )
static void parse_artists( const struct json_array *artists,
acoustid_mb_result_t *record )
{
+ assert( artists != NULL );
/* take only main */
if ( artists->size < 1)
return;
@@ -78,7 +79,8 @@ static void parse_recordings( vlc_object_t *p_obj, const
struct json_object *obj
}
const struct json_array *artists = json_get_array(&recordnode->object,
"artists");
- parse_artists( artists, record );
+ if (artists != NULL)
+ parse_artists( artists, record );
msg_Dbg( p_obj, "recording %d title %s %36s %s", i, record->psz_title,
record->s_musicbrainz_id, record->psz_artist );
}
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/ec9adb00d10fae2d7aa5685020f5c6525e3db642
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/ec9adb00d10fae2d7aa5685020f5c6525e3db642
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits