mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Fix potential segfault on malloc failure
[originally from svn r323]
This commit is contained in:
parent
5fa57669ec
commit
55b8c21f0f
6
window.c
6
window.c
@ -678,8 +678,10 @@ static int WINAPI WndProc (HWND hwnd, UINT message,
|
||||
cl = malloc(16 + strlen(session)); /* 8, but play safe */
|
||||
if (!cl)
|
||||
cl = NULL; /* not a very important failure mode */
|
||||
sprintf(cl, "putty @%s", session);
|
||||
freecl = TRUE;
|
||||
else {
|
||||
sprintf(cl, "putty @%s", session);
|
||||
freecl = TRUE;
|
||||
}
|
||||
} else
|
||||
cl = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user