bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH hurd 01/30] proc: fix NULL dereference


From: Samuel Thibault
Subject: Re: [PATCH hurd 01/30] proc: fix NULL dereference
Date: Thu, 27 Nov 2014 19:17:17 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Justus Winter, le Thu 27 Nov 2014 14:18:41 +0100, a écrit :
> This also restores the behavior before e9687ec4.
> 
> * proc/notify.c (do_mach_notify_dead_name): Fix NULL dereference.

I had actually already commited the same :)

> ---
>  proc/notify.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/proc/notify.c b/proc/notify.c
> index b6731ae..f179423 100644
> --- a/proc/notify.c
> +++ b/proc/notify.c
> @@ -41,6 +41,9 @@ do_mach_notify_dead_name (struct port_info *pi,
>  {
>    struct proc *p;
>  
> +  if (! pi)
> +    return EOPNOTSUPP;
> +
>    if (pi->port_right == generic_port)
>      {
>        check_dead_execdata_notify (deadport);
> @@ -50,9 +53,7 @@ do_mach_notify_dead_name (struct port_info *pi,
>  
>    p = (struct proc *) pi;
>  
> -  if (!p
> -      || p->p_pi.bucket != proc_bucket
> -      || p->p_pi.class != proc_class)
> +  if (p->p_pi.bucket != proc_bucket || p->p_pi.class != proc_class)
>      return EOPNOTSUPP;
>  
>    if (p->p_task == deadport)
> -- 
> 2.1.3
> 

-- 
Samuel
<b> il faut combien de chevaux pour tirer une doloréan à 88 morph ?
***b vient de remarque que 88 mph c'est 142 km/h
<y> aaaaah
<y> c'est pour ça qu'ils limitent à 130 km/h sur les autoroutes
<y> c'est pour éviter que les gens voyagent dans le temps
<b> probablement



reply via email to

[Prev in Thread] Current Thread [Next in Thread]