Skip to content

Commit 7314efd

Browse files
committed
patch 7.4.903
Problem: MS-Windows: When 'encoding' differs from the current code page, expandinig wildcards may cause illegal memory access. Solution: Allocate a longer buffer. (Ken Takata)
1 parent 4c0aac5 commit 7314efd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/misc1.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9940,8 +9940,9 @@ dos_expandpath(
99409940
return 0;
99419941
}
99429942

9943-
/* make room for file name */
9944-
buf = alloc((int)STRLEN(path) + BASENAMELEN + 5);
9943+
/* Make room for file name. When doing encoding conversion the actual
9944+
* length may be quite a bit longer, thus use the maximum possible length. */
9945+
buf = alloc((int)MAXPATHL);
99459946
if (buf == NULL)
99469947
return 0;
99479948

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
903,
744746
/**/
745747
902,
746748
/**/

0 commit comments

Comments
 (0)