diff options
author | Michael Schroeder <mls@suse.de> | 2008-01-30 11:17:31 +0000 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2008-01-30 11:17:31 +0000 |
commit | 0389ed910155edad25c6a469d2a6ec9e7f368b63 (patch) | |
tree | d3224d8cd41f5d565819bd1f6b1dfc60c9f4041d /src/repo_solv.c | |
parent | 5407081f91268d1ffa9a2cd505bc6c7d8023b7fe (diff) | |
download | libsolv-0389ed910155edad25c6a469d2a6ec9e7f368b63.tar.gz libsolv-0389ed910155edad25c6a469d2a6ec9e7f368b63.tar.bz2 libsolv-0389ed910155edad25c6a469d2a6ec9e7f368b63.zip |
allow empty strings
Diffstat (limited to 'src/repo_solv.c')
-rw-r--r-- | src/repo_solv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/repo_solv.c b/src/repo_solv.c index fadfc51..722b650 100644 --- a/src/repo_solv.c +++ b/src/repo_solv.c @@ -662,7 +662,7 @@ repo_add_solv_parent(Repo *repo, FILE *fp, Repodata *parent) if ((solvflags & SOLV_FLAG_PREFIX_POOL) == 0) { - if (fread(strsp, sizeid, 1, fp) != 1) + if (sizeid && fread(strsp, sizeid, 1, fp) != 1) { pool_debug(pool, SAT_ERROR, "read error while reading strings\n"); return SOLV_ERROR_EOF; @@ -675,7 +675,7 @@ repo_add_solv_parent(Repo *repo, FILE *fp, Repodata *parent) char *pp = prefix; char *old_str = 0; char *dest = strsp; - if (fread(prefix, pfsize, 1, fp) != 1) + if (pfsize && fread(prefix, pfsize, 1, fp) != 1) { pool_debug(pool, SAT_ERROR, "read error while reading strings\n"); sat_free(prefix); |