summaryrefslogtreecommitdiff
path: root/crt
diff options
context:
space:
mode:
authorAlexey Izbyshev <izbyshev@ispras.ru>2023-01-26 14:47:39 +0300
committerRich Felker <dalias@aerifal.cx>2023-02-12 17:42:37 -0500
commit7e13e5ae69a243b90b90d2f4b79b2a150f806335 (patch)
tree9ddb9075b4a043dabcdf556bc82ed2d144f898cf /crt
parent7e6da7ac98efdc8167ed2d109298ba232a9a7ba3 (diff)
downloadmusl-7e13e5ae69a243b90b90d2f4b79b2a150f806335.tar.gz
musl-7e13e5ae69a243b90b90d2f4b79b2a150f806335.tar.bz2
musl-7e13e5ae69a243b90b90d2f4b79b2a150f806335.tar.xz
musl-7e13e5ae69a243b90b90d2f4b79b2a150f806335.zip
inet_pton: fix uninitialized memory use for IPv4-mapped IPv6 addresses
When a dot is encountered, the loop counter is incremented before exiting the loop, but the corresponding ip array element is left uninitialized, so the subsequent memmove (if "::" was seen) and the loop copying ip to the output buffer will operate on an uninitialized uint16_t. The uninitialized data never directly influences the control flow and is overwritten on successful return by the second half of the parsed IPv4 address. But it's better to fix this to avoid unexpected transformations by a sufficiently smart compiler and reports from UB-detection tools.
Diffstat (limited to 'crt')
0 files changed, 0 insertions, 0 deletions