mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
FS13713: Fix null ponter deref with mp4 files with a tracknum of 0
mp4 metadata doesn't use strtol, so needs to handle things differently. Change-Id: Idb54fae845b08222ea6b79870f6b99390af9c684
This commit is contained in:
parent
75df18f2c1
commit
bc627659ec
1 changed files with 1 additions and 2 deletions
|
|
@ -482,10 +482,9 @@ static bool read_mp4_tags(int fd, struct mp3entry* id3,
|
|||
break;
|
||||
|
||||
case MP4_trkn: {
|
||||
char *p = NULL;
|
||||
int tracknum = 0;
|
||||
read_mp4_tag_i_from_n(fd, &tracknum, &id3->track_string, size, &buffer_left, &buffer);
|
||||
if (!(tracknum == 0 && (errno || *p)))
|
||||
if (!(tracknum == 0 && (id3->track_string && *id3->track_string)))
|
||||
id3->tracknum = tracknum;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue