From: Mark Andrews Date: Thu, 16 Jun 2016 01:37:43 +0000 (+1000) Subject: 4384. [bug] isc_buffer_reallocate returns wrong result when passed X-Git-Tag: v9.11.0b1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01a0206c4050f79021f674d7710654451727fd4c;p=thirdparty%2Fbind9.git 4384. [bug] isc_buffer_reallocate returns wrong result when passed a smaller length than what is already allocated. [RT #42612] --- diff --git a/CHANGES b/CHANGES index 4b8db33e571..febcb801123 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +4384. [bug] isc_buffer_reallocate returns wrong result when passed + a smaller length than what is already allocated. + [RT #42612] + 4383. [bug] Correct spelling error in stats channel description of "EDNS client subnet option received". [RT #42633] diff --git a/lib/isc/buffer.c b/lib/isc/buffer.c index c8cbdd5a5da..751baf1fa60 100644 --- a/lib/isc/buffer.c +++ b/lib/isc/buffer.c @@ -523,7 +523,7 @@ isc_buffer_reallocate(isc_buffer_t **dynbuffer, unsigned int length) { REQUIRE((*dynbuffer)->mctx != NULL); if ((*dynbuffer)->length > length) - return (ISC_R_NOSPACE); + return (ISC_R_SUCCESS); /* * XXXMUKS: This is far more expensive than plain realloc() as