mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
3026. [bug] lib/isc/httpd.c: check that we have enough space
after calling grow_headerspace() and if not re-call grow_headerspace() until we do. [RT #22521]
This commit is contained in:
parent
e06bc030b3
commit
17a0bbda33
4
CHANGES
4
CHANGES
@ -1,3 +1,7 @@
|
||||
3026. [bug] lib/isc/httpd.c: check that we have enough space
|
||||
after calling grow_headerspace() and if not
|
||||
re-call grow_headerspace() until we do. [RT #22521]
|
||||
|
||||
3025. [bug] Fixed a possible deadlock due to zone resigning.
|
||||
[RT #22964]
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: httpd.c,v 1.20 2010/11/16 05:38:31 marka Exp $ */
|
||||
/* $Id: httpd.c,v 1.21 2011/02/21 05:55:09 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@ -821,7 +821,7 @@ isc_httpd_response(isc_httpd_t *httpd)
|
||||
needlen += 3 + 1; /* room for response code, always 3 bytes */
|
||||
needlen += strlen(httpd->retmsg) + 2; /* return msg + CRLF */
|
||||
|
||||
if (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
|
||||
while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
|
||||
result = grow_headerspace(httpd);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
@ -846,7 +846,7 @@ isc_httpd_addheader(isc_httpd_t *httpd, const char *name,
|
||||
needlen += 2 + strlen(val); /* :<space> and val */
|
||||
needlen += 2; /* CRLF */
|
||||
|
||||
if (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
|
||||
while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
|
||||
result = grow_headerspace(httpd);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
@ -869,7 +869,7 @@ isc_httpd_endheaders(isc_httpd_t *httpd)
|
||||
{
|
||||
isc_result_t result;
|
||||
|
||||
if (isc_buffer_availablelength(&httpd->headerbuffer) < 2) {
|
||||
while (isc_buffer_availablelength(&httpd->headerbuffer) < 2) {
|
||||
result = grow_headerspace(httpd);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
@ -893,7 +893,7 @@ isc_httpd_addheaderuint(isc_httpd_t *httpd, const char *name, int val) {
|
||||
needlen += 2 + strlen(buf); /* :<space> and val */
|
||||
needlen += 2; /* CRLF */
|
||||
|
||||
if (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
|
||||
while (isc_buffer_availablelength(&httpd->headerbuffer) < needlen) {
|
||||
result = grow_headerspace(httpd);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
Loading…
x
Reference in New Issue
Block a user