changeset 8214:6fd2cce50fe2 quic

Fixed infinite loop in ngx_quic_stream_send_chain().
author Roman Arutyunyan <arut@nginx.com>
date Fri, 13 Mar 2020 18:30:37 +0300
parents 33a22e74101e
children 38c0898b6df7
files src/event/ngx_event_quic.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -1989,7 +1989,7 @@ ngx_quic_stream_send_chain(ngx_connectio
     ssize_t     n;
     ngx_buf_t  *b;
 
-    while (in) {
+    for ( /* void */; in; in = in->next) {
         b = in->buf;
 
         if (!ngx_buf_in_memory(b)) {
@@ -2016,8 +2016,6 @@ ngx_quic_stream_send_chain(ngx_connectio
             b->pos += n;
             return in;
         }
-
-        in = in->next;
     }
 
     return NULL;