Adjust rpmfi directory count while messing with it in build
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 11 Nov 2008 15:35:42 +0000 (17:35 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 11 Nov 2008 15:35:42 +0000 (17:35 +0200)
- otherwise we can miss some entries in rpmfiFN() max calculation and
  blow up in entertaining ways

build/files.c

index 088c8b3..db9335d 100644 (file)
@@ -1258,6 +1258,7 @@ static void genCpioListAndHeader(FileList fl,
     fi->bnl = _free(fi->bnl);
     fi->dil = _free(fi->dil);
 
+    fi->dc = fi->fc;
     fi->dnl = xmalloc(fi->fc * sizeof(*fi->dnl) + dpathlen + 1);
     d = (char *)(fi->dnl + fi->fc);
     *d = '\0';