mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Use sgrowarray_nm in GetDlgItemText_alloc
GetDlgItemText_alloc is often used to get passwords from text fields, so the memory should be freed and erased properly. Otherwise parts of passwords might leak in memory. Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
parent
7631875d41
commit
674219b115
@ -163,7 +163,7 @@ char *GetDlgItemText_alloc(HWND hwnd, int id)
|
||||
size_t size = 0;
|
||||
|
||||
do {
|
||||
sgrowarray(ret, size, size);
|
||||
sgrowarray_nm(ret, size, size);
|
||||
GetDlgItemText(hwnd, id, ret, size);
|
||||
} while (!memchr(ret, '\0', size-1));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user