Skip to contentSkip to conversation

Fix calloc check in semanage_store:115

SEMANAGE Ivan Gyurdiev 2 participants 2 messages Jan 11, 2006 – Jan 13, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

This fixes an omem check bug noticed by Steve Grubb.

libsemanage/src/semanage_store.c +1 -1
diff -Naurp --exclude ports_local.c --exclude-from excludes old/libsemanage/src/semanage_store.c new/libsemanage/src/semanage_store.c
@@ -114,7 +114,7 @@ static int semanage_init_paths(const cha
 	for (i = 0; i < SEMANAGE_NUM_FILES; i++) {
 		len = (strlen(semanage_relative_files[i]) + prefix_len);
 		semanage_files[i] = calloc(len + 1, sizeof(char));
-		if (!semanage_files[SEMANAGE_ROOT])
+		if (!semanage_files[i])
 			return -1;
 		sprintf(semanage_files[i], "%s%s%s", root, SEMANAGE_MOD_DIR,
 				  semanage_relative_files[i]); 
#1 lore raw
Quoted 1 line · Ivan Gyurdiev

This fixes an omem check bug noticed by Steve Grubb.

Merged as of libsemanage 1.5.12.

Signature · 8 lines
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 [email protected] with
the words "unsubscribe selinux" without quotes as the message.