Author: matz Date: Thu Apr 3 18:20:36 2008 New Revision: 9359 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9359&view=rev Log: Fix a segfault for existing but empty attribute lists. Modified: trunk/sat-solver/src/repodata.c Modified: trunk/sat-solver/src/repodata.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repodata.c?rev=9359&r1=9358&r2=9359&view=diff ============================================================================== --- trunk/sat-solver/src/repodata.c (original) +++ trunk/sat-solver/src/repodata.c Thu Apr 3 18:20:36 2008 @@ -388,6 +388,8 @@ if (!maybe_load_repodata(data, &keyid)) return 0; dp = entry2data(data, entry); + if (!dp) + return 0; dp = data_read_id(dp, &schema); /* make sure the schema of this solvable contains the key */ for (keyp = data->schemadata + data->schemata[schema]; *keyp != keyid; keyp++) @@ -418,6 +420,8 @@ return 0; dp = entry2data(data, entry); + if (!dp) + return 0; dp = data_read_id(dp, &schema); /* make sure the schema of this solvable contains the key */ for (keyp = data->schemadata + data->schemata[schema]; *keyp != keyid; keyp++) @@ -456,6 +460,8 @@ return 0; dp = entry2data(data, entry); + if (!dp) + return 0; dp = data_read_id(dp, &schema); /* make sure the schema of this solvable contains the key */ for (keyp = data->schemadata + data->schemata[schema]; *keyp != keyid; keyp++) @@ -486,6 +492,8 @@ if (!maybe_load_repodata(data, &keyid)) return 0; dp = entry2data(data, entry); + if (!dp) + return 0; dp = data_read_id(dp, &schema); for (keyp = data->schemadata + data->schemata[schema]; *keyp != keyid; keyp++) if (!*keyp) @@ -504,6 +512,8 @@ if (!maybe_load_repodata(data, &keyid)) return 0; dp = entry2data(data, entry); + if (!dp) + return 0; dp = data_read_id(dp, &schema); for (keyp = data->schemadata + data->schemata[schema]; *keyp != keyid; keyp++) if (!*keyp) @@ -530,6 +540,8 @@ return; dp = entry2data(data, entry); + if (!dp) + return; dp = data_read_id(dp, &schema); keyp = data->schemadata + data->schemata[schema]; if (keyname) @@ -593,6 +605,8 @@ Id schema; unsigned char *dp = data->incoredata; + if (!dp) + return; if (di->solvid >= 0) dp += data->incoreoffset[di->solvid - data->start]; else -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org