[tlbuild] xdvik update broke builds on Solaris
Karl Berry
karl at freefriends.org
Mon Mar 2 22:28:58 CET 2020
The xdvik update broke Solaris builds due to undefined strnlen
I committed a simple fix (r54012 and 13) and sent it to Paul. Thanks. -k
--- main.c (revision 53995)
+++ main.c (working copy)
@@ -455,7 +455,10 @@ is_good_dvi_file(const char *filename, Boolean fro
if ((ret = REALPATH(real_filename, canonical_path)) == NULL) {
/* REALPATH failed, use real_filename */
- size_t n = strnlen(real_filename, MAXPATHLEN);
+ size_t n = strlen(real_filename);
+ if (n >= MAXPATHLEN) {
+ n = MAXPATHLEN - 1;
+ }
memcpy(canonical_path, real_filename, n);
canonical_path[n] = '\0';
More information about the tlbuild
mailing list.