mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
put_line(): Add another check against possible buffer overflow (see 193911a).
Change-Id: Idc6637cc42afe612375dab3acac8495278f68f0a
This commit is contained in:
parent
193911af76
commit
09e655f89d
1 changed files with 2 additions and 0 deletions
|
|
@ -210,6 +210,8 @@ static void print_line(struct screen *display,
|
||||||
tempbuf_idx = tempbuf[tempbuf_idx] = 0;
|
tempbuf_idx = tempbuf[tempbuf_idx] = 0;
|
||||||
put_text(display, xpos, y, line, tempbuf, false, 0);
|
put_text(display, xpos, y, line, tempbuf, false, 0);
|
||||||
xpos += display->getstringsize(tempbuf, NULL, NULL);
|
xpos += display->getstringsize(tempbuf, NULL, NULL);
|
||||||
|
if (xpos >= max_width)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
next:
|
next:
|
||||||
ch = *fmt++;
|
ch = *fmt++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue