bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] braces: avoid signed overflow


From: Chet Ramey
Subject: Re: [PATCH] braces: avoid signed overflow
Date: Sat, 12 Oct 2024 16:01:08 -0400
User-agent: Mozilla Thunderbird

On 10/1/24 7:18 PM, Grisha Levit wrote:
INTMAX_MAX=9223372036854775807
eval ": {$((INTMAX_MAX-1))..$((INTMAX_MAX))}"

braces.c:447:9: runtime error: signed integer overflow: 9223372036854775807 + 1 
cannot be represented in type 'intmax_t' (aka 'long')

Thanks for the report and patch.

Chet

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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