mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-02 19:50:12 -05:00
Merge request_file buffer length fix from 'pre-0.83'.
This commit is contained in:
commit
520fd3d820
@ -235,13 +235,13 @@ Filename *request_file(
|
|||||||
char namebuf[MAX_PATH];
|
char namebuf[MAX_PATH];
|
||||||
if (do_filereq_a(
|
if (do_filereq_a(
|
||||||
hwnd, title, initial, dir, save, filter,
|
hwnd, title, initial, dir, save, filter,
|
||||||
NULL, namebuf, sizeof(namebuf)))
|
NULL, namebuf, lenof(namebuf)))
|
||||||
filename = filename_from_str(namebuf);
|
filename = filename_from_str(namebuf);
|
||||||
} else {
|
} else {
|
||||||
wchar_t namebuf[MAX_PATH];
|
wchar_t namebuf[MAX_PATH];
|
||||||
if (do_filereq_w(
|
if (do_filereq_w(
|
||||||
hwnd, title, initial, dir, save, filter,
|
hwnd, title, initial, dir, save, filter,
|
||||||
NULL, namebuf, sizeof(namebuf)))
|
NULL, namebuf, lenof(namebuf)))
|
||||||
filename = filename_from_wstr(namebuf);
|
filename = filename_from_wstr(namebuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,14 +349,14 @@ struct request_multi_file_return *request_multi_file(
|
|||||||
char namebuf[MAX_PATH * MULTI_FACTOR];
|
char namebuf[MAX_PATH * MULTI_FACTOR];
|
||||||
if (do_filereq_a(
|
if (do_filereq_a(
|
||||||
hwnd, title, initial, dir, save, filter,
|
hwnd, title, initial, dir, save, filter,
|
||||||
&first_filename_offset, namebuf, sizeof(namebuf)))
|
&first_filename_offset, namebuf, lenof(namebuf)))
|
||||||
rmf = request_multi_file_populate_a(
|
rmf = request_multi_file_populate_a(
|
||||||
namebuf, first_filename_offset);
|
namebuf, first_filename_offset);
|
||||||
} else {
|
} else {
|
||||||
wchar_t namebuf[MAX_PATH * MULTI_FACTOR];
|
wchar_t namebuf[MAX_PATH * MULTI_FACTOR];
|
||||||
if (do_filereq_w(
|
if (do_filereq_w(
|
||||||
hwnd, title, initial, dir, save, filter,
|
hwnd, title, initial, dir, save, filter,
|
||||||
&first_filename_offset, namebuf, sizeof(namebuf)))
|
&first_filename_offset, namebuf, lenof(namebuf)))
|
||||||
rmf = request_multi_file_populate_w(
|
rmf = request_multi_file_populate_w(
|
||||||
namebuf, first_filename_offset);
|
namebuf, first_filename_offset);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user