X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fkdbg%2Fkdb_cli.c;h=a45009cf7c167bda88b2eda0ea2869a2f154ff8e;hp=a0d5135f929acbe4b917bb65be2504750717aeca;hb=547a7d215fa680ba6a8126fce2d59cefaf769263;hpb=54dc46543f805518571af77d26f300c450b08b9f diff --git a/reactos/ntoskrnl/kdbg/kdb_cli.c b/reactos/ntoskrnl/kdbg/kdb_cli.c index a0d5135f929..a45009cf7c1 100644 --- a/reactos/ntoskrnl/kdbg/kdb_cli.c +++ b/reactos/ntoskrnl/kdbg/kdb_cli.c @@ -2490,14 +2490,12 @@ KdbpReadCommand( */ if (Buffer == Orig) { - strncpy(Buffer, LastCommand, Size); - Buffer[Size - 1] = '\0'; + RtlStringCbCopyA(Buffer, Size, LastCommand); } else { *Buffer = '\0'; - strncpy(LastCommand, Orig, sizeof (LastCommand)); - LastCommand[sizeof (LastCommand) - 1] = '\0'; + RtlStringCbCopyA(LastCommand, sizeof(LastCommand), Orig); } return; @@ -2614,8 +2612,7 @@ KdbpDoCommand( static PCH Argv[256]; static CHAR OrigCommand[1024]; - strncpy(OrigCommand, Command, sizeof(OrigCommand) - 1); - OrigCommand[sizeof(OrigCommand) - 1] = '\0'; + RtlStringCbCopyA(OrigCommand, sizeof(OrigCommand), Command); Argc = 0; p = Command;