Skip to content

Commit

Permalink
Eliinated cppcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tarjanm-movidius committed Oct 6, 2023
1 parent 1869962 commit 00a5d1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ long rewind3v2(long seekpos)
long skipid3v2(long seekpos)
{
long oldseekpos=seekpos; /* remember seekpos */
unsigned char buffer[15];
unsigned char buffer[10] = {0};
int pos, footer, length;

if (seekpos+10>filesize) return seekpos;
Expand All @@ -1663,6 +1663,7 @@ long skipid3v2(long seekpos)
footer=buffer[5]; footer=footer<<3; footer=footer>>7; footer=footer*10; /* check for footer presence */
length=((buffer[6]*128+buffer[7])*128+buffer[8])*128+buffer[9];
id3v2 = (unsigned char*)realloc(id3v2, 10+length+footer);
if (!id3v2) exit(2);
seekpos=seekpos+10+length+footer;
}
fseek(mp3file, oldseekpos, SEEK_SET); /* really necessary? */
Expand Down

0 comments on commit 00a5d1a

Please sign in to comment.