forked from len0rd/rockbox
Text viewer: Fix possible memory corruption
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25510 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1709d72eb4
commit
eeb0c088fe
1 changed files with 1 additions and 1 deletions
|
|
@ -1011,7 +1011,7 @@ static void fill_buffer(long pos, unsigned char* buf, unsigned size)
|
|||
if (offset == 0 && prefs.encoding == UTF_8 && is_bom)
|
||||
rb->lseek(fd, BOM_SIZE, SEEK_SET);
|
||||
|
||||
numread = rb->read(fd, buf, size);
|
||||
numread = rb->read(fd, buf, size - 1);
|
||||
buf[numread] = 0;
|
||||
rb->button_clear_queue(); /* clear button queue */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue