diff options
author | jkim <jkim@FreeBSD.org> | 2013-10-17 00:06:42 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-10-17 00:06:42 +0000 |
commit | f4a31baa14e08b26c3b63f02571280c872cabe90 (patch) | |
tree | 3908357b831dbb78c746f73c443b4d7ba5e966f9 /source/components/debugger/dbinput.c | |
parent | b2a92415360aacb32d9b6107bdcf100d16d09167 (diff) | |
download | FreeBSD-src-f4a31baa14e08b26c3b63f02571280c872cabe90.zip FreeBSD-src-f4a31baa14e08b26c3b63f02571280c872cabe90.tar.gz |
Import ACPICA 20130927.
Diffstat (limited to 'source/components/debugger/dbinput.c')
-rw-r--r-- | source/components/debugger/dbinput.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 511e585..147a023 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -635,7 +635,13 @@ AcpiDbGetLine ( char *This; - ACPI_STRCPY (AcpiGbl_DbParsedBuf, InputBuffer); + if (AcpiUtSafeStrcpy (AcpiGbl_DbParsedBuf, sizeof (AcpiGbl_DbParsedBuf), + InputBuffer)) + { + AcpiOsPrintf ("Buffer overflow while parsing input line (max %u characters)\n", + sizeof (AcpiGbl_DbParsedBuf)); + return (0); + } This = AcpiGbl_DbParsedBuf; for (i = 0; i < ACPI_DEBUGGER_MAX_ARGS; i++) @@ -740,6 +746,11 @@ AcpiDbCommandDispatch ( return (AE_CTRL_TERMINATE); } + + /* Add all commands that come here to the history buffer */ + + AcpiDbAddToHistory (InputBuffer); + ParamCount = AcpiDbGetLine (InputBuffer); CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]); Temp = 0; @@ -1135,7 +1146,7 @@ AcpiDbCommandDispatch ( case CMD_NOT_FOUND: default: - AcpiOsPrintf ("Unknown Command\n"); + AcpiOsPrintf ("%s: unknown command\n", AcpiGbl_DbArgs[0]); return (AE_CTRL_TRUE); } @@ -1144,9 +1155,6 @@ AcpiDbCommandDispatch ( Status = AE_CTRL_TRUE; } - /* Add all commands that come here to the history buffer */ - - AcpiDbAddToHistory (InputBuffer); return (Status); } |