diff options
author | 2010-01-17 00:25:35 +0000 | |
---|---|---|
committer | 2010-01-17 00:25:35 +0000 | |
commit | 46ed896172d38b6bf281f85d8ee61a1488f77f3a (patch) | |
tree | 73e5dd6c4f129b41c32c1251d6f410992a3ae1bc | |
parent | didnt mean to commit that previous change to eat_file, but fix the intended c... (diff) | |
download | portage-utils-46ed896172d38b6bf281f85d8ee61a1488f77f3a.tar.gz portage-utils-46ed896172d38b6bf281f85d8ee61a1488f77f3a.tar.bz2 portage-utils-46ed896172d38b6bf281f85d8ee61a1488f77f3a.zip |
make sure eat_file always returns a string with a NULv0.3.1
-rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* * Copyright 2005-2008 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.172 2010/01/17 00:24:32 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.c,v 1.173 2010/01/17 00:25:35 vapier Exp $ * * Copyright 2005-2008 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2008 Mike Frysinger - <vapier@gentoo.org> @@ -185,6 +185,7 @@ static char eat_file(const char *file, char *buf, const size_t bufsize) if ((fd = open(file, O_RDONLY)) == -1) return ret; + buf[0] = '\0'; if (fstat(fd, &s) != 0) goto close_and_ret; if (s.st_size) { |