cnt %x can't go beyond 4 digit. i thought it would better if we
specify and anyway it doesn't matter and it just adds an additional
check.
thx,thayumanavar s.

On Tue, Jul 20, 2010 at 7:16 AM,  <[email protected]> wrote:
>
> Hi,
>
> Thayumanavar Sachithanantham:
>> correct name could not go beyond 242 chars and because of cnt/%d the
>> buffer could be overrun.
>> I think having
>> snprintf(p, WH_TMP_LEN+1, "%.*x", AUFS_WH_TMP_LEN, cnt++); would be better.
>
> 'cnt' is 'short' and its size is guranteed as
>        BUILD_BUG_ON(sizeof(cnt) * 2 > AUFS_WH_TMP_LEN);
> (earlier in the same function).
> Is it really neccesary to specify WH_TMP_LEN+1?
>
>
> J. R. Okajima
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

Reply via email to