1
0
Fork 0
forked from len0rd/rockbox

MP4 tag parser: guard against problems when the buffer is full.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15105 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Magnus Holmgren 2007-10-14 13:27:01 +00:00
parent d777a367ad
commit 9146f20ea2

View file

@ -109,7 +109,7 @@ static unsigned int read_mp4_tag_string(int fd, int size_left, char** buffer,
unsigned int* buffer_left, char** dest)
{
unsigned int bytes_read = read_mp4_tag(fd, size_left, *buffer,
*buffer_left - 1);
*buffer_left > 0 ? *buffer_left - 1 : 0);
unsigned int length = 0;
if (bytes_read)