From 522939961785cd611ad1e7195af6bce154706bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 14 Mar 2008 13:10:30 +0000 Subject: [PATCH] setuid-wrapper: Disallow empty `.real' files. svn path=/nixos/trunk/; revision=11122 --- helpers/setuid/setuid-wrapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/setuid/setuid-wrapper.c b/helpers/setuid/setuid-wrapper.c index 30452fc7b7b..32965d40c11 100644 --- a/helpers/setuid/setuid-wrapper.c +++ b/helpers/setuid/setuid-wrapper.c @@ -63,6 +63,7 @@ int main(int argc, char * * argv) len = read(fdSelf, real, PATH_MAX); assert (len != -1); assert (len < sizeof (real)); + assert (len > 0); real[len] = 0; close(fdSelf);