[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14530: [PATCH] od: -wN, N>64K, avoid misbehavior on systems with 32-
From: |
Jim Meyering |
Subject: |
bug#14530: [PATCH] od: -wN, N>64K, avoid misbehavior on systems with 32-bit size_t |
Date: |
Sun, 02 Jun 2013 18:31:54 +0200 |
close 14530
thanks
Pádraig Brady wrote:
> On 06/02/2013 03:39 AM, Jim Meyering wrote:
>> Rich reported this bug privately.
>>
>> Here's a proposed patch.
>> I could have fixed the underlying problem with
>> explicit casts to a wider type (including floating point types),
>> but this seemed cleanest, if perhaps a little too subtle.
>> I'd rather not write a comment in each of three places,
>> and didn't really want to factor out a 3-input function
>> just to compute each next_pad value.
>
> Since this is just a local variable,
> I think the proposed solution is fine.
>
>
>> Along the way, I noticed that an unreasonably large width
>> caused trouble, but I'm not inclined to worry about it:
>>
>> $ : | od -An -a -w$(echo 2^32-1|bc)
>> od: memory exhausted
>
> Yes this is an artificial limit, but in such
> and edge case as I don't think it's worth
> complicating the code for.
>
> +1
Thanks for the review.
Pushed.