mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 01:22:43 +00:00 
			
		
		
		
	Meta: Add a fuzzer for the QOILoader
This commit is contained in:
		
							parent
							
								
									67788641d3
								
							
						
					
					
						commit
						92672b1520
					
				
					 3 changed files with 22 additions and 0 deletions
				
			
		|  | @ -34,6 +34,7 @@ add_simple_fuzzer(FuzzPBMLoader LagomGfx) | ||||||
| add_simple_fuzzer(FuzzPGMLoader LagomGfx) | add_simple_fuzzer(FuzzPGMLoader LagomGfx) | ||||||
| add_simple_fuzzer(FuzzPPMLoader LagomGfx) | add_simple_fuzzer(FuzzPPMLoader LagomGfx) | ||||||
| add_simple_fuzzer(FuzzPDF LagomPDF) | add_simple_fuzzer(FuzzPDF LagomPDF) | ||||||
|  | add_simple_fuzzer(FuzzQOILoader LagomGfx) | ||||||
| add_simple_fuzzer(FuzzQuotedPrintableParser LagomIMAP) | add_simple_fuzzer(FuzzQuotedPrintableParser LagomIMAP) | ||||||
| add_simple_fuzzer(FuzzHebrewDecoder LagomTextCodec) | add_simple_fuzzer(FuzzHebrewDecoder LagomTextCodec) | ||||||
| add_simple_fuzzer(FuzzHttpRequest LagomHTTP) | add_simple_fuzzer(FuzzHttpRequest LagomHTTP) | ||||||
|  |  | ||||||
							
								
								
									
										16
									
								
								Meta/Lagom/Fuzzers/FuzzQOILoader.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Meta/Lagom/Fuzzers/FuzzQOILoader.cpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | ||||||
|  | /*
 | ||||||
|  |  * Copyright (c) 2020, the SerenityOS developers. | ||||||
|  |  * | ||||||
|  |  * SPDX-License-Identifier: BSD-2-Clause | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | #include <LibGfx/QOILoader.h> | ||||||
|  | #include <stddef.h> | ||||||
|  | #include <stdint.h> | ||||||
|  | 
 | ||||||
|  | extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size) | ||||||
|  | { | ||||||
|  |     Gfx::QOIImageDecoderPlugin decoder(data, size); | ||||||
|  |     (void)decoder.frame(0); | ||||||
|  |     return 0; | ||||||
|  | } | ||||||
|  | @ -24,6 +24,7 @@ | ||||||
|     T(PGMLoader)             \ |     T(PGMLoader)             \ | ||||||
|     T(PNGLoader)             \ |     T(PNGLoader)             \ | ||||||
|     T(PPMLoader)             \ |     T(PPMLoader)             \ | ||||||
|  |     T(QOILoader)             \ | ||||||
|     T(RegexECMA262)          \ |     T(RegexECMA262)          \ | ||||||
|     T(RegexPosixExtended)    \ |     T(RegexPosixExtended)    \ | ||||||
|     T(Shell)                 \ |     T(Shell)                 \ | ||||||
|  | @ -87,6 +88,10 @@ ENUMERATE_TARGETS(__ENUMERATE_TARGET) | ||||||
| #include <Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp> | #include <Meta/Lagom/Fuzzers/FuzzPPMLoader.cpp> | ||||||
| #undef LLVMFuzzerTestOneInput | #undef LLVMFuzzerTestOneInput | ||||||
| 
 | 
 | ||||||
|  | #define LLVMFuzzerTestOneInput TestQOILoader | ||||||
|  | #include <Meta/Lagom/Fuzzers/FuzzQOILoader.cpp> | ||||||
|  | #undef LLVMFuzzerTestOneInput | ||||||
|  | 
 | ||||||
| #define LLVMFuzzerTestOneInput TestRegexECMA262 | #define LLVMFuzzerTestOneInput TestRegexECMA262 | ||||||
| #include <Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp> | #include <Meta/Lagom/Fuzzers/FuzzRegexECMA262.cpp> | ||||||
| #undef LLVMFuzzerTestOneInput | #undef LLVMFuzzerTestOneInput | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh