Re: [PATCH] arch/sparc: additional len check in loop for prom_getbootargs

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

 



Hell David Miller:

1) Is this patch applied ?  or need some discussion ?  or suspended ?

2) If possible: 
   A) can you tell me about our patch processing work flow "
   B) or some reference links (or document location) ?

thanks.


于 2012年11月08日 11:41, Chen Gang 写道:
> 
>   when cp >= barg_buf + BARG_LEN-2, it only break internel loop (while)
>   but outside loop (for) still has effect, and "*cp++ = ' '" repeating
>   so need additional checking for it.
> 
> 
> Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx>
> ---
>  arch/sparc/prom/bootstr_32.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/sparc/prom/bootstr_32.c b/arch/sparc/prom/bootstr_32.c
> index f5ec32e..25cda1c 100644
> --- a/arch/sparc/prom/bootstr_32.c
> +++ b/arch/sparc/prom/bootstr_32.c
> @@ -40,6 +40,10 @@ prom_getbootargs(void)
>  				*cp++ = *arg++;
>  			}
>  			*cp++ = ' ';
> +			if(cp >= barg_buf + BARG_LEN-1){
> +				/* We might issue a warning here. */
> +				break;
> +			}
>  		}
>  		*cp = 0;
>  		break;
> 


-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux