All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] checkpolicy: dereference rangehead after checking it was not NULL
@ 2017-03-17 22:10 Nicolas Iooss
  2017-03-21 18:29 ` James Carter
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2017-03-17 22:10 UTC (permalink / raw)
  To: selinux

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 checkpolicy/policy_define.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
index dbafadb01e21..949ca7117233 100644
--- a/checkpolicy/policy_define.c
+++ b/checkpolicy/policy_define.c
@@ -1924,11 +1924,11 @@ int avrule_ioctl_ranges(struct av_ioctl_range_list **rangelist)
 	/* read in ranges to include and omit */
 	if (avrule_read_ioctls(&rangehead))
 		return -1;
-	omit = rangehead->omit;
 	if (rangehead == NULL) {
 		yyerror("error processing ioctl commands");
 		return -1;
 	}
+	omit = rangehead->omit;
 	/* sort and merge the input ioctls */
 	if (avrule_sort_ioctls(&rangehead))
 		return -1;
-- 
2.12.0

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

* Re: [PATCH 1/1] checkpolicy: dereference rangehead after checking it was not NULL
  2017-03-17 22:10 [PATCH 1/1] checkpolicy: dereference rangehead after checking it was not NULL Nicolas Iooss
@ 2017-03-21 18:29 ` James Carter
  0 siblings, 0 replies; 2+ messages in thread
From: James Carter @ 2017-03-21 18:29 UTC (permalink / raw)
  To: Nicolas Iooss, selinux

On 03/17/2017 06:10 PM, Nicolas Iooss wrote:
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Applied.

Thanks,
Jim

> ---
>  checkpolicy/policy_define.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
> index dbafadb01e21..949ca7117233 100644
> --- a/checkpolicy/policy_define.c
> +++ b/checkpolicy/policy_define.c
> @@ -1924,11 +1924,11 @@ int avrule_ioctl_ranges(struct av_ioctl_range_list **rangelist)
>  	/* read in ranges to include and omit */
>  	if (avrule_read_ioctls(&rangehead))
>  		return -1;
> -	omit = rangehead->omit;
>  	if (rangehead == NULL) {
>  		yyerror("error processing ioctl commands");
>  		return -1;
>  	}
> +	omit = rangehead->omit;
>  	/* sort and merge the input ioctls */
>  	if (avrule_sort_ioctls(&rangehead))
>  		return -1;
>


-- 
James Carter <jwcart2@tycho.nsa.gov>
National Security Agency

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

end of thread, other threads:[~2017-03-21 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 22:10 [PATCH 1/1] checkpolicy: dereference rangehead after checking it was not NULL Nicolas Iooss
2017-03-21 18:29 ` James Carter

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.