svn commit: trunk/busybox: coreutils libbb
vda at busybox.net
vda at busybox.net
Thu Aug 9 08:10:15 UTC 2007
Author: vda
Date: 2007-08-09 01:10:13 -0700 (Thu, 09 Aug 2007)
New Revision: 19420
Log:
stat: fix option -Z segv (bug 1454)
Modified:
trunk/busybox/coreutils/stat.c
trunk/busybox/libbb/make_directory.c
Changeset:
Modified: trunk/busybox/coreutils/stat.c
===================================================================
--- trunk/busybox/coreutils/stat.c 2007-08-09 08:04:05 UTC (rev 19419)
+++ trunk/busybox/coreutils/stat.c 2007-08-09 08:10:13 UTC (rev 19420)
@@ -342,8 +342,11 @@
security_context_t scontext = NULL;
if (option_mask32 & OPT_SELINUX) {
- if ((option_mask32 & OPT_DEREFERENCE ? lgetfilecon(filename, scontext):
- getfilecon(filename, scontext))< 0) {
+ if ((option_mask32 & OPT_DEREFERENCE
+ ? lgetfilecon(filename, &scontext)
+ : getfilecon(filename, &scontext)
+ ) < 0
+ ) {
bb_perror_msg(filename);
return 0;
}
@@ -448,9 +451,12 @@
security_context_t scontext = NULL;
if (option_mask32 & OPT_SELINUX) {
- if ((option_mask32 & OPT_DEREFERENCE ? lgetfilecon(filename, scontext):
- getfilecon(filename, scontext))< 0) {
- bb_perror_msg (filename);
+ if ((option_mask32 & OPT_DEREFERENCE
+ ? lgetfilecon(filename, &scontext)
+ : getfilecon(filename, &scontext)
+ ) < 0
+ ) {
+ bb_perror_msg(filename);
return 0;
}
}
Modified: trunk/busybox/libbb/make_directory.c
===================================================================
--- trunk/busybox/libbb/make_directory.c 2007-08-09 08:04:05 UTC (rev 19419)
+++ trunk/busybox/libbb/make_directory.c 2007-08-09 08:10:13 UTC (rev 19420)
@@ -98,6 +98,6 @@
} while (1);
- bb_perror_msg ("cannot %s directory '%s'", fail_msg, path);
+ bb_perror_msg("cannot %s directory '%s'", fail_msg, path);
return -1;
}
More information about the busybox-cvs
mailing list