Fix invalid memory access from rpmdb growth estimation (RhBug:766260)
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Feb 2012 12:53:29 +0000 (14:53 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Feb 2012 12:53:29 +0000 (14:53 +0200)
commit96e0472301a9d0388c6fb91cb05ec8864ffba62f
treec9bdc9c6df6750a7c5a354c42b682c78555baa2f
parent9defc922e971d98203890f1557ab951ec94f2a3f
Fix invalid memory access from rpmdb growth estimation (RhBug:766260)

- The dsi retrieved from rpmtsDbDSI() would become invalid whenever
  ts->dsi structure got realloced, ie anytime when disk space is
  calculated for a different fs than where the rpmdb resides. This
  is likely to be the real issue behind RhBug:766260 and also RhBug:671056.
  Just call rpmtsUpdateDSI() directly with suitable arguments for the
  rpmdb to avoid the special (re)alloc paths.
- In addition, consider the db growth for packages with no files too.
lib/transaction.c