mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	updates to OSS-Fuzz integration
adapt more fuzz targets from zlib, add zip fuzzer, zip dictionary. update uncompress_fuzzer to seed the buffer length separately.
This commit is contained in:
		
							
								
								
									
										20
									
								
								tests/uncompress2_fuzzer.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								tests/uncompress2_fuzzer.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| /* Derived from zlib fuzzers at http://github.com/google/oss-fuzz/tree/master/projects/zlib, | ||||
|  * see ossfuzz.sh for full license text. | ||||
| */ | ||||
|  | ||||
| #include <stddef.h> | ||||
| #include <stdint.h> | ||||
| #include <string.h> | ||||
|  | ||||
| #include "miniz.h" | ||||
|  | ||||
| static unsigned char buffer[256 * 1024] = { 0 }; | ||||
|  | ||||
| int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) | ||||
| { | ||||
|     unsigned long int buffer_length = sizeof(buffer); | ||||
|  | ||||
|     if (Z_OK != uncompress2(buffer, &buffer_length, data, &size)) return 0; | ||||
|      | ||||
|     return 0; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user