Author: mlschroe Date: Wed Jan 30 12:17:31 2008 New Revision: 8410 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8410&view=rev Log: allow empty strings Modified: trunk/sat-solver/src/repo_solv.c Modified: trunk/sat-solver/src/repo_solv.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo_solv.c?rev=8410&r1=8409&r2=8410&view=diff ============================================================================== --- trunk/sat-solver/src/repo_solv.c (original) +++ trunk/sat-solver/src/repo_solv.c Wed Jan 30 12:17:31 2008 @@ -662,7 +662,7 @@ 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 @@ 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); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org