mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
[COV] cuesheet.c var line could be uninitialized
Change-Id: Id753ecc28f4029e05032be0c0ac6ecd27e9e370f
This commit is contained in:
parent
99f8457279
commit
b31444261e
1 changed files with 17 additions and 14 deletions
|
@ -222,7 +222,8 @@ bool parse_cuesheet(struct cuesheet_file *cue_file, struct cuesheet *cue)
|
|||
|
||||
/* Look for a Unicode BOM */
|
||||
unsigned char bom_read = 0;
|
||||
read(fd, line, BOM_UTF_8_SIZE);
|
||||
if (read(fd, line, BOM_UTF_8_SIZE) > 0)
|
||||
{
|
||||
if(!memcmp(line, BOM_UTF_8, BOM_UTF_8_SIZE))
|
||||
{
|
||||
char_enc = CHAR_ENC_UTF_8;
|
||||
|
@ -238,6 +239,8 @@ bool parse_cuesheet(struct cuesheet_file *cue_file, struct cuesheet *cue)
|
|||
char_enc = CHAR_ENC_UTF_16_BE;
|
||||
bom_read = BOM_UTF_16_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
if (bom_read < BOM_UTF_8_SIZE)
|
||||
lseek(fd, cue_file->pos + bom_read, SEEK_SET);
|
||||
if (is_embedded)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue