mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 17:19:22 +00:00
* commands/cat.c (grub_cmd_cat): Fix buffer overrun if '\r' is the
last character in the buffer. Reported by: Vladimir Serbinenko.
This commit is contained in:
1 parent
dccaf99d10
commit
1ba9b88946
2 files changed
+7
-1
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
2010-06-29 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* commands/cat.c (grub_cmd_cat): Fix buffer overrun if '\r' is the
|
||||||
|
last character in the buffer.
|
||||||
|
Reported by: Vladimir Serbinenko.
|
||||||
|
|
||||||
2010-06-29 Robert Millan <rmh@gnu.org>
|
2010-06-29 Robert Millan <rmh@gnu.org>
|
||||||
|
|
||||||
* docs/grub.texi (Simple configuration): Document ${GRUB_BADRAM}.
|
* docs/grub.texi (Simple configuration): Document ${GRUB_BADRAM}.
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ grub_cmd_cat (grub_extcmd_t cmd, int argc, char **args)
|
|||||||
|
|
||||||
if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
|
if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
|
||||||
grub_putchar (c);
|
grub_putchar (c);
|
||||||
else if (dos && c == '\r' && buf[i + 1] == '\n')
|
else if (dos && c == '\r' && i + 1 < size && buf[i + 1] == '\n')
|
||||||
{
|
{
|
||||||
grub_putchar ('\n');
|
grub_putchar ('\n');
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
Reference in new issue
Block a user