Skip to content
Commit 30a3b08c authored by Max Filippov's avatar Max Filippov Committed by Thomas Petazzoni
Browse files

argp-standalone: restrict value range passed to isprint function

According to C standards isprint argument shall be representable as an
unsigned char or be equal to EOF, otherwise the behaviour is undefined.

Passing arbitrary ints leads to segfault in nm program from elfutils.

Restrict isprint argument range to values representable by unsigned char.

Note: a similar change was done to the internal argp implementation of
glibc in commit
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=9055724a92433ffa4c36f93d918ee1b3dfa1d6f7

.

[Thomas: add a reference to the corresponding glibc fix.]

Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 90d63bde
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment