Research
.
Skip Search Box

SELinux Mailing List

Re: [PATCH] add variable initializer

From: serue_at_us.ibm.com
Date: Mon, 22 Aug 2005 07:05:36 -0500


Sorry, this patch was in libsemanage.

-serge

Quoting serue@us.ibm.com (serue@us.ibm.com):
> The following patch fixes a bug found by Coverity:
>
> It is possible to goto cleanup: before outfile is
> initialized. At cleanup: we try to close(outfile)
> if it is not NULL.
>
> Index: src/commit_api.c
> ===================================================================
> --- src.orig/commit_api.c
> +++ src/commit_api.c
> @@ -182,7 +182,7 @@ int semod_expand_sandbox(char *sandbox,
> char *kernel_filename = NULL;
> sidtab_t sidtab;
> struct policy_file pf;
> - FILE *outfile;
> + FILE *outfile = NULL;
> if (policydb_init (&out, POLICY_KERN) == -1) {
> write_error (error_buf, error_buf_size, "Out of memory!");
> retval = -1;
>
> --
> 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.
>

--
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.
Received on Mon 22 Aug 2005 - 13:01:33 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service