Merge pull request #95 from cgwalters/empty-passwd-einval

passwd: Avoid EINVAL if previous passwd data is empty somehow
This commit is contained in:
Colin Walters 2015-01-09 12:06:20 -05:00
commit 3ea0e3fc16

View File

@ -893,6 +893,9 @@ concat_passwd_file (GFile *yumroot,
if (!g_file_load_contents (source, cancellable,
&contents, &len, NULL, error))
goto out;
if (len == 0)
continue;
if (src_stream) (void) fclose (src_stream);
src_stream = fmemopen (contents, len, "r");