Skip to content
Snippets Groups Projects

randomizer: do not pass NULL to memcpy()

Merged Romain Vimont requested to merge rom1v/vlc:randomizer_fix into master
All threads resolved!

When switching playback order from NORMAL to RANDOM, the current playlist items are added to the randomizer.

However, if the playlist is empty, the items vector is empty, and its `.data field is NULL. This causes the following error in ASAN:

../../src/playlist/randomizer.c:426:10: runtime error: null pointer passed as argument 2, which is declared to never be null

If the playlist size is 0, then do not call randomizer_Add() at all.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading