From 31d8f73ff95ef33490c0a8e165149286ec3e071a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 17 Sep 2015 08:51:25 +1000 Subject: [PATCH] 4208. [bug] Address null pointer dereferences on out of memory. [RT #40764] (cherry picked from commit fe51e068f0892ae9258d9fd0e14fe2a469ff8edf) --- CHANGES | 3 +++ bin/nsupdate/nsupdate.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index cbe12d0db3..21463166d6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4208. [bug] Address null pointer dereferences on out of memory. + [RT #40764] + 4207. [bug] Handle class mismatches with raw zone files. [RT #40746] diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index bf907f1580..55613eeab8 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -640,6 +640,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();