From: Daniel J Walsh <dwalsh@redhat.com>
To: SELinux <selinux@tycho.nsa.gov>
Subject: libsemanage direct_api can return errors < 0.
Date: Mon, 08 Jun 2009 15:07:59 -0400 [thread overview]
Message-ID: <4A2D618F.2050509@redhat.com> (raw)
[-- 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;
}
next reply other threads:[~2009-06-08 19:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 19:07 Daniel J Walsh [this message]
2009-07-07 19:47 ` libsemanage direct_api can return errors < 0 Joshua Brindle
2009-07-07 20:50 ` Possible OpenSSH exploit Tracy Reed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A2D618F.2050509@redhat.com \
--to=dwalsh@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.