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:
Max Kellermann
2009-11-18 19:55:38 +01:00
parent f51ba6464a
commit 97f8e017c4
2 changed files with 3 additions and 0 deletions

View File

@@ -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];