2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

4208. [bug] Address null pointer dereferences on out of memory.

[RT #40764]
This commit is contained in:
Mark Andrews
2015-09-17 08:51:25 +10:00
parent 7d2c4d1c9f
commit fe51e068f0
3 changed files with 7 additions and 0 deletions

View File

@@ -641,6 +641,8 @@ read_sessionkey(isc_mem_t *mctx, isc_log_t *lctx) {
len = strlen(algorithm) + strlen(mykeyname) + strlen(secretstr) + 3;
keystr = isc_mem_allocate(mctx, len);
if (keystr == NULL)
fatal("out of memory");
snprintf(keystr, len, "%s:%s:%s", algorithm, mykeyname, secretstr);
setup_keystr();