summaryrefslogtreecommitdiff
path: root/src/repo_solv.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2008-01-30 11:17:31 +0000
committerMichael Schroeder <mls@suse.de>2008-01-30 11:17:31 +0000
commit0389ed910155edad25c6a469d2a6ec9e7f368b63 (patch)
treed3224d8cd41f5d565819bd1f6b1dfc60c9f4041d /src/repo_solv.c
parent5407081f91268d1ffa9a2cd505bc6c7d8023b7fe (diff)
downloadlibsolv-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.c4
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);