mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove json checks in fuzzer SAPI
JSON is now always enabled
This commit is contained in:
parent
7aa8c7e6aa
commit
7562679b45
2 changed files with 1 additions and 12 deletions
|
@ -28,13 +28,9 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "fuzzer-sapi.h"
|
||||
|
||||
#ifdef HAVE_JSON
|
||||
#include "ext/json/php_json_parser.h"
|
||||
#endif
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
#ifdef HAVE_JSON
|
||||
char *data = malloc(Size+1);
|
||||
memcpy(data, Data, Size);
|
||||
data[Size] = '\0';
|
||||
|
@ -55,10 +51,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
|||
php_request_shutdown(NULL);
|
||||
|
||||
free(data);
|
||||
#else
|
||||
fprintf(stderr, "\n\nERROR:\nPHP built without JSON, recompile with --enable-json to use this fuzzer\n");
|
||||
exit(1);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue