Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebadcb1

Browse files
committed
FSSpec names may be longer on carbon (1024 chars), cater for that in buffer sizes.
1 parent 91faef8 commit ebadcb1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Mac/Python/macgetargv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ PyMac_GetFullPath (FSSpec *fss, char *buf)
115115
{
116116
short err;
117117
FSSpec fss_parent, fss_current;
118-
char tmpbuf[256];
118+
char tmpbuf[1024];
119119
int plen;
120120

121121
fss_current = *fss;
@@ -135,7 +135,7 @@ PyMac_GetFullPath (FSSpec *fss, char *buf)
135135
fss_current = fss_parent;
136136
/* Prepend path component just found to buf */
137137
plen = fss_current.name[0];
138-
if (strlen(buf) + plen + 1 > 256) {
138+
if (strlen(buf) + plen + 1 > 1024) {
139139
/* Oops... Not enough space (shouldn't happen) */
140140
*buf = 0;
141141
return -1;

0 commit comments

Comments
 (0)