Skip to content

Commit c27bc78

Browse files
committed
Tack null on more carefully
1 parent 23e6cf5 commit c27bc78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_path.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1060,8 +1060,8 @@ int __convert_to_string(PathIterator &path,
10601060
if ((p = __append_to_string(p, buffer, *buffersize, "\n")) == NULL) return 1;
10611061
}
10621062

1063-
*p = '\0';
1064-
*buffersize = p - buffer;
1063+
if ((p = __append_to_string(p, buffer, *buffersize, "\0")) == NULL) return 1;
1064+
*buffersize = p - buffer - 1;
10651065

10661066
return 0;
10671067
}

0 commit comments

Comments
 (0)