decoder/flac: fixed NULL pointer dereference in CUE code
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
This commit is contained in:
parent
f51ba6464a
commit
97f8e017c4
1
NEWS
1
NEWS
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue