]> sourceware.org Git - glibc.git/commit
elf: fix handling of negative numbers in dl-printf
authorRoy Eldar <royeldar0@gmail.com>
Thu, 25 May 2023 14:41:58 +0000 (17:41 +0300)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 25 May 2023 16:50:59 +0000 (18:50 +0200)
commitdae801527386f94e9d2fabf23c37863d1b599153
tree297cda761c1f88e3f15502d2ae651b82175be984
parent44d4d3bdcff67c7fa0b0c046fef9919e9c66c1b2
elf: fix handling of negative numbers in dl-printf

_dl_debug_vdprintf is a bare-bones printf implementation; currently
printing a signed integer (using "%d" format specifier) behaves
incorrectly when the number is negative, as it just prints the
corresponding unsigned integer, preceeded by a minus sign.

For example, _dl_printf("%d", -1) would print '-4294967295'.

Signed-off-by: Roy Eldar <royeldar0@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
elf/dl-printf.c
This page took 0.04167 seconds and 5 git commands to generate.