branch | stable |
changeset 19317 | 66da6e9feacd |
parent 19185 | 8bed40e02c3b |
child 20535 | 5f683209f5b6 |
--- a/mercurial/pathencode.c Thu Jun 20 14:06:11 2013 -0500 +++ b/mercurial/pathencode.c Wed Jun 19 22:34:34 2013 -0700 @@ -585,7 +585,8 @@ in a space or dot, which are unportable. */ if (d == '.' || d == ' ') dest[destlen - 1] = '_'; - if (destlen > maxshortdirslen) + /* The + 3 is to account for "dh/" in the beginning */ + if (destlen > maxshortdirslen + 3) break; charcopy(dest, &destlen, destsize, src[i]); p = -1;