소스 검색

Check offset

walkor 3 년 전
부모
커밋
aa9c58b02e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/Protocols/Http/Request.php

+ 3 - 0
src/Protocols/Http/Request.php

@@ -535,6 +535,9 @@ class Request
     {
         $file = [];
         $boundary = "\r\n$boundary";
+        if (\strlen($this->_buffer) < $section_start_offset) {
+            return 0;
+        }
         $section_end_offset = \strpos($this->_buffer, $boundary, $section_start_offset);
         if (!$section_end_offset) {
             return 0;