lsb_realpath segfaults on nonexistant directories
The lsb_realpath utility in lts_lsb-fhs-1.1.2.1.tgz segfaults if it's
run on a directory that doesn't exist. This doesn't cause any failure
that I know of, but was suprising. Here's a patch.
--- lsb_realpath.c.orig Sun Mar 3 22:20:08 2002
+++ lsb_realpath.c Sun Mar 3 22:37:02 2002
@@ -70,7 +70,7 @@
canon_name = realpath ( argv[1], namebuf );
if ( canon_name == NULL ) {
- fprintf(stderr, "%s returned -1, set errno to %d (%s)", errno,
+ fprintf(stderr, "%s returned NULL, set errno to %d (%s)", "realpath", errno,
strerror(errno));
exit(LSB_FHS_TS_UNRESOLVED);
}
--
see shy jo
Reply to: