From: Remi Gacogne Date: Tue, 29 May 2018 14:11:04 +0000 (+0200) Subject: ixfrdist: Fix a NULL-pointer dereference on a non-existing UID X-Git-Tag: dnsdist-1.3.1~47^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e88e004ec0c2a02fe58947fd035f04a4bf15d79b;p=pdns ixfrdist: Fix a NULL-pointer dereference on a non-existing UID Reported by cppcheck. --- diff --git a/pdns/ixfrdist.cc b/pdns/ixfrdist.cc index 29830a601..4a768ddf4 100644 --- a/pdns/ixfrdist.cc +++ b/pdns/ixfrdist.cc @@ -1037,7 +1037,7 @@ int main(int argc, char** argv) { } g_log<pw_uid) < 0) { + if (setuid(newuid) < 0) { g_log<