ソースを参照

Properly check for end of data when looking for the tracking id

Co-authored-by: Brice Figureau <brice-puppet@daysofwonder.com>
pull/62/head
Benny Baumann 1年前
コミット
b3e86ee66d
1個のファイルの変更4行の追加8行の削除
  1. 4
    8
      ngx_http_uploadprogress_module.c

+ 4
- 8
ngx_http_uploadprogress_module.c ファイルの表示

@@ -376,10 +376,8 @@ get_tracking_id(ngx_http_request_t * r)
376 376
                 i = 1;
377 377
                 break;
378 378
             }
379
-            else if (!len) {
380
-                break;
381
-            }
382
-        } while (p++);
379
+            p++;
380
+        } while (len > 0);
383 381
 
384 382
         if (i) {
385 383
             start_p = p += upcf->header.len + 1;
@@ -469,10 +467,8 @@ get_tracking_ids_mul(ngx_http_request_t * r)
469 467
                 i = 1;
470 468
                 break;
471 469
             }
472
-            else if (!len) {
473
-                break;
474
-            }
475
-        } while (p++);
470
+            p++;
471
+        } while (len > 0);
476 472
 
477 473
         if (i) {
478 474
             start_p = p += upcf->header_mul.len + 1;

読み込み中…
キャンセル
保存