[Top][All Lists]

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

uninorm/composition.c:75:22: runtime error

From: Simon Josefsson
Subject: uninorm/composition.c:75:22: runtime error
Date: Fri, 04 Mar 2022 12:48:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi.  I encountered the following runtime error when running libidn2
self-tests (log in [1]) with ASAN/UBSAN checks [2] and recent gnulib.

uninorm/composition.c:75:22: runtime error: implicit conversion from type 
'unsigned int' of value 218 (32-bit, unsigned) to type 'char' changed the value 
to -38 (8-bit, signed)

The system has libunistring 0.9.10 installed, which could affect this,
since the way libidn2 uses gnulib's libunistring modules may be
incorrect -- in particular, it forgot to link with gnulib's libunistring
replacement modules when the system has libunistring -- however this
problem started to appear when I attempted [3] to fix that issue.  That
suggests the unistring code always would trigger this problem, but it
was hidden by the libidn2 build problem that made it use the system
libunistring instead.

The uninorm/composition.c code looks like this:

uc_composition (ucs4_t uc1, ucs4_t uc2)
          char codes[6];
          codes[2] = uc1 & 0xff;

Thoughts?  The code has looked the same for a long time.


[1] https://gitlab.com/libidn/libidn2/-/jobs/2163463557
[2] https://gitlab.com/libidn/libidn2/-/blob/master/.gitlab-ci.yml#L386

Attachment: signature.asc
Description: PGP signature

reply via email to

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