bug-gnu-libiconv
[Top][All Lists]
Advanced

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

[bug-gnu-libiconv] [bug #66289] undefined behavior: 32 bit values stored


From: Bruno Haible
Subject: [bug-gnu-libiconv] [bug #66289] undefined behavior: 32 bit values stored in an `int` in the 32-bit charsets like UTF-32LE
Date: Fri, 4 Oct 2024 20:32:31 -0400 (EDT)

Update of bug #66289 (group libiconv):

                Category:                 Program => Converters             
                  Status:                    None => Fixed                  
             Assigned to:                    None => haible                 
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:


> The following command can reproduce the bug:
> echo -en 'ter\x91' | iconv -f UTF-32LE
> With the output:
> utf32le.h:30:59: runtime error: left shift of 145 by 24 places cannot be
represented in type 'int'

Thanks for the report. Fixed through
https://git.savannah.gnu.org/gitweb/?p=libiconv.git;a=commitdiff;h=eed6782cbb4651876e3c8b27ea53273f230ee8e2
.

> make invalid assumptions about the size of `int` being predictable on all
platforms, which could cause an integer overflow on certain embedded systems
with unusual but allowed int sizes

GNU libiconv's porting targets don't include 16-bit operating systems like DOS
or Windows 3.1. The library's code size is ca. 1 MB; there is no way to make
this work in a system with 16 bits address range.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66289>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

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