mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-12 00:47:49 -04:00
FS#13748 - The imageviewer plugin decodes the file infinitely when opening a empty JPEG file.
Couldn't reproduce this on most of my devices or the sims turns out the bug depends on uninitialized memory being FF and the file empty Uninitialized memory fixed what I saw at least.. Change-Id: Ie267af0a20685003ee28ff42d008dd7942a7c6fc
This commit is contained in:
parent
1c3e9c181e
commit
3c6b9bb458
2 changed files with 3 additions and 2 deletions
|
|
@ -74,6 +74,7 @@ extern int TELL(void)
|
|||
|
||||
extern void *OPEN(char *f)
|
||||
{
|
||||
memset(buff, 0, sizeof(buff));
|
||||
printf("Opening %s\n", f);
|
||||
cur_buff_pos = length = file_pos = 0;
|
||||
fd = rb->open(f,O_RDONLY);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ static int fd;
|
|||
|
||||
extern int GETC(void)
|
||||
{
|
||||
unsigned char x;
|
||||
rb->read(fd, &x, 1);
|
||||
unsigned char x = 0;
|
||||
rb->read(fd, &x, 1)
|
||||
return x;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue