]> git.ipfire.org Git - thirdparty/libbsd.git/commit
nlist: Fix pread() return value check
authorGuillem Jover <guillem@hadrons.org>
Sat, 15 Jun 2019 12:33:32 +0000 (14:33 +0200)
committerGuillem Jover <guillem@hadrons.org>
Thu, 8 Aug 2019 01:22:09 +0000 (03:22 +0200)
commitce53f7c25f64a694550886113154ce0b201be58f
treef56470adf7aa1f42e8bef7c7784e0be5d0ad280c
parent24d1f4dd34cd86759673f736c16e671a6303f8a8
nlist: Fix pread() return value check

We should check for partial reads, and not continue in those cases,
as we are not retrying them, otherwise we might end up operating on
uninitialized data.

Reported-by: Daniel Hodson <daniel@elttam.com.au>
Based-on-patch-by: Daniel Hodson <daniel@elttam.com.au>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
src/nlist.c