OSDN Git Service

confdata: fix invalid write
authorBen Boeckel <mathstuf@gmail.com>
Sat, 17 Oct 2015 15:58:44 +0000 (11:58 -0400)
committerWaldemar Brodkorb <wbx@uclibc-ng.org>
Thu, 22 Oct 2015 01:45:12 +0000 (03:45 +0200)
commit34983ba9755185046484acafeedb8aae93de9951
tree9df13463dfab924cc423a6dee41eb5c18de14d1a
parent1a3b9cf039abc53825b3f65992cc22c36692dc02
confdata: fix invalid write

stndup will copy *up to* the size parameter, not allocate a buffer of
that size, so the buffer is not necessarily large enough to fit the
".old" extension.

Caught with glibc's MALLOC_CHECK_=3.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
extra/config/confdata.c