Commit 97f8e017 authored by Max Kellermann's avatar Max Kellermann

decoder/flac: fixed NULL pointer dereference in CUE code

The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
parent f51ba646
......@@ -11,6 +11,7 @@ ver 0.15.6 (2009/??/??)
- ffmpeg: align the output buffer
- oggflac: rewind stream after FLAC detection
- flac: fixed CUE seeking range check
- flac: fixed NULL pointer dereference in CUE code
* output_thread: check again if output is open on PAUSE
* update: delete ignored symlinks from database
* database: increased maximum line length to 32 kB
......
......@@ -415,6 +415,8 @@ flac_vtrack_tnum(const char* fname)
* another/better way would be to use tag struct
*/
char* ptr = strrchr(fname, '_');
if (ptr == NULL)
return 0;
// copy ascii tracknumber to int
char vtrack[4];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment