|
From: <mad...@us...> - 2007-07-23 15:53:30
|
Revision: 2497
http://svn.sourceforge.net/selinux/?rev=2497&view=rev
Author: madmethod
Date: 2007-07-23 08:53:27 -0700 (Mon, 23 Jul 2007)
Log Message:
-----------
Author: Stephen Smalley
Email: sd...@ty...
Subject: libselinux: fix type mismatch in string_to_security_class
Date: Mon, 23 Jul 2007 10:21:57 -0400
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 <sd...@ty...>
Acked-By: Joshua Brindle <me...@ma...>
Modified Paths:
--------------
trunk/libselinux/ChangeLog
trunk/libselinux/VERSION
trunk/libselinux/src/stringrep.c
Modified: trunk/libselinux/ChangeLog
===================================================================
--- trunk/libselinux/ChangeLog 2007-07-18 15:10:34 UTC (rev 2496)
+++ trunk/libselinux/ChangeLog 2007-07-23 15:53:27 UTC (rev 2497)
@@ -1,3 +1,7 @@
+2.0.25 2007-07-23
+ * Fix for string_to_security_class segfault on x86_64 from Stephen
+ Smalley.
+
2.0.24 2007-09-07
* Fix for getfilecon() for zero-length contexts from Stephen Smalley.
Modified: trunk/libselinux/VERSION
===================================================================
--- trunk/libselinux/VERSION 2007-07-18 15:10:34 UTC (rev 2496)
+++ trunk/libselinux/VERSION 2007-07-23 15:53:27 UTC (rev 2497)
@@ -1 +1 @@
-2.0.24
+2.0.25
Modified: trunk/libselinux/src/stringrep.c
===================================================================
--- trunk/libselinux/src/stringrep.c 2007-07-18 15:10:34 UTC (rev 2496)
+++ trunk/libselinux/src/stringrep.c 2007-07-23 15:53:27 UTC (rev 2497)
@@ -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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|