All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] libselinux:  fix type mismatch in string_to_security_class
@ 2007-07-23 14:21 Stephen Smalley
  2007-07-23 15:56 ` Joshua Brindle
  2007-07-24 18:05 ` John D. Ramsdell
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Smalley @ 2007-07-23 14:21 UTC (permalink / raw)
  To: selinux; +Cc: Christopher J. PeBenito, Joshua Brindle, Karl MacMillan

Fix type mismatch in string_to_security_class, produces seg fault on x86_64.
For https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249038

Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>

---

 stringrep.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: src/stringrep.c
===================================================================
--- src/stringrep.c	(revision 2496)
+++ src/stringrep.c	(working copy)
@@ -236,7 +236,7 @@
 
 	dentry = readdir(dir);
 	while (dentry != NULL) {
-		size_t value;
+		unsigned int value;
 		struct stat m;
 
 		snprintf(path, sizeof path, "%s/class/%s/perms/%s", selinux_mnt,s,dentry->d_name);
@@ -258,7 +258,7 @@
 		if (ret < 0)
 			goto err4;
 
-		if (sscanf(buf, "%u", (unsigned int *)&value) != 1)
+		if (sscanf(buf, "%u", &value) != 1)
 			goto err4;
 
 		node->perms[value-1] = strdup(dentry->d_name);

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-24 19:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23 14:21 [patch] libselinux: fix type mismatch in string_to_security_class Stephen Smalley
2007-07-23 15:56 ` Joshua Brindle
2007-07-24 18:05 ` John D. Ramsdell
2007-07-24 19:05   ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.