diff -ru sbin/mount.orig/mount.c sbin/mount/mount.c --- sbin/mount.orig/mount.c 2004-08-15 13:23:03.000000000 -0300 +++ sbin/mount/mount.c 2004-10-25 20:51:23.000000000 -0200 @@ -444,9 +444,9 @@ errx(1, "malloc failed"); cp[0] = '\0'; for (edir = edirs; *edir; edir++) { - strcat(cp, *edir); + strlcat(cp, *edir, len); if (edir[1] != NULL) - strcat(cp, ", "); + strlcat(cp, ", ", len); } warn("exec mount_%s not found in %s", vfstype, cp); } @@ -618,11 +618,11 @@ */ newopt = NULL; for (p = expopt; (o = strsep(&p, ",")) != NULL;) { - if ((tmpopt = malloc( strlen(o) + 2 + 1 )) == NULL) + size_t len = strlen(o) + 2 + 1; + if ((tmpopt = malloc(len)) == NULL) errx(1, "malloc failed"); - strcpy(tmpopt, "no"); - strcat(tmpopt, o); + snprintf(tmpopt, len, "no%s", o); remopt(newopt, tmpopt); free(tmpopt);