File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ void run_tidy_parser(TidyBuffer* data_buffer,
38
38
tidyRelease (tdoc );
39
39
}
40
40
41
+ #if 0 /* 00000000000000000000000000000000000 */
41
42
void attach_string_to_buffer (const uint8_t * data ,
42
43
size_t size ,
43
44
TidyBuffer * buffer ) {
@@ -50,6 +51,7 @@ void attach_string_to_buffer(const uint8_t* data,
50
51
}
51
52
tidyBufAttach (buffer , (byte * )data_string , strlen (data_string ) + 1 );
52
53
}
54
+ #endif /* #if 0 - 00000000000000000000000000000000000 */
53
55
54
56
int LLVMFuzzerTestOneInput (const uint8_t * data , size_t size ) {
55
57
TidyBuffer data_buffer ;
@@ -59,7 +61,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
59
61
tidyBufInit (& output_buffer );
60
62
tidyBufInit (& error_buffer );
61
63
62
- attach_string_to_buffer (data , size , & data_buffer );
64
+ /* attach_string_to_buffer(data, size, &data_buffer); can be binary data!!! ie has null's */
65
+ tidyBufAppend ( & data_buffer , (void * )data , (uint )size ); /* move data into buffer */
66
+
63
67
run_tidy_parser (& data_buffer , & output_buffer , & error_buffer );
64
68
65
69
tidyBufFree (& error_buffer );
You can’t perform that action at this time.
0 commit comments