Skip to content

Commit

Permalink
dep/libchdr: Check that metadata seek succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Nov 2, 2024
1 parent 12acecb commit 2c3d1d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dep/libchdr/src/libchdr_chd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3201,7 +3201,8 @@ static chd_error metadata_find_entry(chd_file *chd, uint32_t metatag, uint32_t m
uint32_t count;

/* read the raw header */
core_fseek(chd->file, metaentry->offset, SEEK_SET);
if (core_fseek(chd->file, metaentry->offset, SEEK_SET) != 0)
break;
count = core_fread(chd->file, raw_meta_header, sizeof(raw_meta_header));
if (count != sizeof(raw_meta_header))
break;
Expand Down

0 comments on commit 2c3d1d9

Please sign in to comment.