bug-bash
[Top][All Lists]
Advanced

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

Re: bash-4.3 bug report


From: Chet Ramey
Subject: Re: bash-4.3 bug report
Date: Mon, 14 Apr 2014 10:50:27 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 4/14/14, 5:34 AM, David Binderman wrote:
> Hello there,
> 
>  [bind.c:2238]: (style) Array index 'j' is used before limits check.
> 
> Source code is
> 
>           for (j = 0; invokers[j] && j < 5; j++)
> 
> Suggest new code
> 
>           for (j = 0; (j < 5) && (invokers[j] != NULL); j++)

Can you give me a use case for which this makes a difference?


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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