All of lore.kernel.org
 help / color / mirror / Atom feed
* libsemanage direct_api can return errors < 0.
@ 2009-06-08 19:07 Daniel J Walsh
  2009-07-07 19:47 ` Joshua Brindle
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel J Walsh @ 2009-06-08 19:07 UTC (permalink / raw)
  To: SELinux

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: libsemanage-directapi.patch --]
[-- Type: text/plain, Size: 1177 bytes --]

--- nsalibsemanage/src/direct_api.c	2009-01-13 08:45:35.000000000 -0500
+++ libsemanage-2.0.31/src/direct_api.c	2009-06-02 14:54:20.000000000 -0400
@@ -991,7 +991,7 @@
 
 	int retval = -1;
 	char *data = NULL;
-	size_t data_len = 0;
+	ssize_t data_len = 0;
 	int compressed = 0;
 	int in_fd = -1;
 
@@ -999,7 +999,7 @@
 		return -1;
 	}
 
-	if ((data_len = map_file(in_fd, &data, &compressed)) == 0) {
+	if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) {
 		goto cleanup;
 	}
 		
@@ -1117,7 +1117,7 @@
 {
 	int retval = -1;
 	char *data = NULL;
-	size_t data_len = 0;
+	ssize_t data_len = 0;
 	int compressed = 0;
 	int in_fd = -1;
 
@@ -1125,7 +1125,7 @@
 		return -1;
 	}
 
-	if ((data_len = map_file(in_fd, &data, &compressed)) == 0) {
+	if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) {
 		goto cleanup;
 	}
 
@@ -1187,7 +1187,7 @@
 {
 	int retval = -1;
 	char *data = NULL;
-	size_t data_len = 0;
+	ssize_t data_len = 0;
 	int compressed = 0;
 	int in_fd;
 
@@ -1195,7 +1195,7 @@
 		return -1;
 	}
 
-	if ((data_len = map_file(in_fd, &data, &compressed)) == 0) {
+	if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) {
 		goto cleanup;
 	}
 		

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

end of thread, other threads:[~2009-07-07 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 19:07 libsemanage direct_api can return errors < 0 Daniel J Walsh
2009-07-07 19:47 ` Joshua Brindle
2009-07-07 20:50   ` Possible OpenSSH exploit Tracy Reed

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.