mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
metadata/mp3data.c set data to 0 in case of read error
Change-Id: I15d4e3d3be4bf4531c892f4351355b0b2e8e0ca9
This commit is contained in:
parent
2008b7d1b0
commit
8a8fd3d4a3
1 changed files with 2 additions and 3 deletions
|
|
@ -215,10 +215,9 @@ static bool headers_have_same_type(unsigned long header1,
|
|||
/* Helper function to read 4-byte in big endian format. */
|
||||
static void read_uint32be_mp3data(int fd, unsigned long *data)
|
||||
{
|
||||
#ifdef ROCKBOX_BIG_ENDIAN
|
||||
(void)read(fd, (char*)data, 4);
|
||||
#else
|
||||
*data = 0;
|
||||
(void)read(fd, (char*)data, 4);
|
||||
#ifndef ROCKBOX_BIG_ENDIAN
|
||||
*data = betoh32(*data);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue