comparison src/http/ngx_http_spdy.c @ 5696:19a14a484707

SPDY: added protection from overrun of the receive buffer.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 30 Apr 2014 20:34:20 +0400
parents 231588611230
children b522d5b137fd
comparison
equal deleted inserted replaced
5695:231588611230 5696:19a14a484707
1919 u_char *end) 1919 u_char *end)
1920 { 1920 {
1921 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0, 1921 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
1922 "spdy frame complete pos:%p end:%p", pos, end); 1922 "spdy frame complete pos:%p end:%p", pos, end);
1923 1923
1924 if (pos > end) {
1925 ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0,
1926 "receive buffer overrun");
1927
1928 ngx_debug_point();
1929 return ngx_http_spdy_state_internal_error(sc);
1930 }
1931
1924 sc->handler = ngx_http_spdy_state_head; 1932 sc->handler = ngx_http_spdy_state_head;
1925 sc->stream = NULL; 1933 sc->stream = NULL;
1926 1934
1927 return pos; 1935 return pos;
1928 } 1936 }