Bah, we have to handle the empty string too. Whenever there were empty
authorMichael Matz <matz@suse.de>
Tue, 5 Feb 2008 14:06:26 +0000 (14:06 +0000)
committerMichael Matz <matz@suse.de>
Tue, 5 Feb 2008 14:06:26 +0000 (14:06 +0000)
strings (STRID_EMPTY), e.g. in s->vendor, the SOLV file was fairly
messed up in subtle ways.  This might fix #354404 (at least with this I
can't reproduce it).  Probably most SOLV files need to be regenerated.

tools/repo_write.c

index e0db955..86b95f3 100644 (file)
@@ -1245,7 +1245,7 @@ if (cbdata.dirused)
       int same;
       size_t len;
       for (same = 0; same < 255; same++)
-       if (old_str[same] != str[same])
+       if (!old_str[same] || !str[same] || old_str[same] != str[same])
          break;
       *pp++ = same;
       len = strlen (str + same) + 1;