mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
dirmngr: Fix use-after-free due to a realloc shrinking.
* dirmngr/ks-engine-hkp.c (map_host): Do not use original pointer after realloc. -- vex01 reported and debugged the problem. GnuPG-bug-id: 2107 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
ddf9dd135a
commit
75c64c2b6d
@ -512,7 +512,7 @@ map_host (ctrl_t ctrl, const char *name, int force_reselect,
|
|||||||
xfree (reftbl);
|
xfree (reftbl);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
qsort (reftbl, refidx, sizeof *reftbl, sort_hostpool);
|
qsort (hi->pool, refidx, sizeof *reftbl, sort_hostpool);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xfree (reftbl);
|
xfree (reftbl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user