Message-ID: <8lgn409p4k2kp
de8d428d7a4r7fsgjc8b4@4ax.com>
p4raw-id: //depot/perl@22466
/* FindFirstFile() and stat() are buggy with a trailing
* backslash, so change it to a forward slash :-( */
case '\\':
+ if (l >= sizeof(buffer)) {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
strncpy(buffer, path, l-1);
buffer[l - 1] = '/';
buffer[l] = '\0';