comparison src/http/ngx_http_spdy.c @ 5606:6c7f9fd5fd7e

SPDY: always check size of data to be saved into state buffer.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 18 Mar 2014 17:00:19 +0400
parents 3a72b1805c52
children b93db4e4ff77
comparison
equal deleted inserted replaced
5605:3a72b1805c52 5606:6c7f9fd5fd7e
1870 1870
1871 static u_char * 1871 static u_char *
1872 ngx_http_spdy_state_save(ngx_http_spdy_connection_t *sc, 1872 ngx_http_spdy_state_save(ngx_http_spdy_connection_t *sc,
1873 u_char *pos, u_char *end, ngx_http_spdy_handler_pt handler) 1873 u_char *pos, u_char *end, ngx_http_spdy_handler_pt handler)
1874 { 1874 {
1875 #if (NGX_DEBUG) 1875 #if 1
1876 if (end - pos > NGX_SPDY_STATE_BUFFER_SIZE) { 1876 if (end - pos > NGX_SPDY_STATE_BUFFER_SIZE) {
1877 ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0, 1877 ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0,
1878 "spdy state buffer overflow: " 1878 "spdy state buffer overflow: "
1879 "%z bytes required", end - pos); 1879 "%z bytes required", end - pos);
1880 return ngx_http_spdy_state_internal_error(sc); 1880 return ngx_http_spdy_state_internal_error(sc);