bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] Possible off-by-one error


From: Samuel Thibault
Subject: Re: [PATCH] Possible off-by-one error
Date: Thu, 4 Feb 2021 00:01:07 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Andrea G. Monaco, le mer. 03 févr. 2021 23:56:26 +0100, a ecrit:
> I am still fairly new, so this could be wrong, but maybe I found an
> off-by-one error.

That's completely one!

Applied, thanks!

> diff --git a/i386/i386at/com.c b/i386/i386at/com.c
> index 02b650b8..3402a025 100644
> --- a/i386/i386at/com.c
> +++ b/i386/i386at/com.c
> @@ -101,7 +101,7 @@ comprobe_general(struct bus_device *dev, int noisy)
>         char    *type = "8250";
>         int     i;
>  
> -       if ((unit < 0) || (unit > NCOM)) {
> +       if ((unit < 0) || (unit >= NCOM)) {
>                 printf("com %d out of range\n", unit);
>                 return(0);
>         }
> 
> 
> -- 
> Andrea G. Monaco
> Hacker, mathematician, lgbt+ activist
> "Hope will never be silent!", H. Milk
> 



reply via email to

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