setuid-wrapper: Disallow empty `.real' files.

svn path=/nixos/trunk/; revision=11122
This commit is contained in:
Ludovic Courtès 2008-03-14 13:10:30 +00:00
parent 6c8bae53c1
commit 5229399617

View File

@ -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);