]> granicus.if.org Git - python/commitdiff
FSSpec names may be longer on carbon (1024 chars), cater for that in buffer sizes.
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 9 Jan 2001 22:25:49 +0000 (22:25 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 9 Jan 2001 22:25:49 +0000 (22:25 +0000)
Mac/Python/macgetargv.c

index b8457816920f080c1f768557c145236afa85094d..bef197ca5ba9870fec6e48f353fe26276ca7bf7d 100644 (file)
@@ -115,7 +115,7 @@ PyMac_GetFullPath (FSSpec *fss, char *buf)
 {
        short err;
        FSSpec fss_parent, fss_current;
-       char tmpbuf[256];
+       char tmpbuf[1024];
        int plen;
 
        fss_current = *fss;
@@ -135,7 +135,7 @@ PyMac_GetFullPath (FSSpec *fss, char *buf)
                 fss_current = fss_parent;
                 /* Prepend path component just found to buf */
                        plen = fss_current.name[0];
-                       if (strlen(buf) + plen + 1 > 256) {
+                       if (strlen(buf) + plen + 1 > 1024) {
                                /* Oops... Not enough space (shouldn't happen) */
                                *buf = 0;
                                return -1;