[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 4/4] Make sure input buffers are always null-terminated
Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- src/tty/tty.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tty/tty.c b/src/tty/tty.c index c3dfcf9..cb1378d 100644 --- a/src/tty/tty.c +++ b/src/tty/tty.c @@ -317,6 +317,8 @@ GetCredentials( sizeof (Context->UserName), &Size, FALSE); + Context->UserName[MAXIMUM_BUFFER_SIZE - 1] = TEXT('\0'); + if (!Success) return FALSE; @@ -338,6 +340,8 @@ GetCredentials( PasswordSize, &Size, TRUE); + Password[(PasswordSize / sizeof(TCHAR)) - 1] = TEXT('\0'); + if (!Success) return FALSE; @@ -384,6 +388,8 @@ RequestElevation( sizeof (Buffer), &Size, FALSE); + Buffer[MAXIMUM_BUFFER_SIZE - 1] = TEXT('\0'); + if (!Success) return FALSE; -- 2.16.2.windows.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |