This is an automated email from the ASF dual-hosted git repository.

kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 5be9064114 Fix build for Http3frame fuzz test (#11581)
5be9064114 is described below

commit 5be9064114f880d436673ef78d4129fd5032e298
Author: Kit Chan <[email protected]>
AuthorDate: Fri Jul 19 23:42:49 2024 -0700

    Fix build for Http3frame fuzz test (#11581)
    
    * Update fuzz_http3frame.cc
    
    * Update fuzz_http3frame.cc
---
 tests/fuzzing/fuzz_http3frame.cc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/fuzzing/fuzz_http3frame.cc b/tests/fuzzing/fuzz_http3frame.cc
index 15dd43091e..cb03656519 100644
--- a/tests/fuzzing/fuzz_http3frame.cc
+++ b/tests/fuzzing/fuzz_http3frame.cc
@@ -20,6 +20,8 @@
 
 #include "proxy/http3/Http3Frame.h"
 #include "proxy/http3/Http3Config.h"
+#include "proxy/http3/Http3FrameDispatcher.h"
+#include "proxy/http3/Http3SettingsHandler.h"
 
 #include "records/RecordsConfig.h"
 #include "tscore/Layout.h"
@@ -52,8 +54,14 @@ LLVMFuzzerTestOneInput(const uint8_t *input_data, size_t 
size_data)
 
   static bool Initialized = DoInitialization();
 
+  MIOBuffer *input1 = new_MIOBuffer(BUFFER_SIZE_INDEX_128);
+  input1->write(input_data, size_data);
+  IOBufferReader *input_reader1 = input1->alloc_reader();
+
   Http3FrameFactory frame_factory;
-  frame_factory.fast_create(input_data, size_data);
+  frame_factory.fast_create(*input_reader1);
+
+  free_MIOBuffer(input1);
 
   return 0;
 }

Reply via email to