Skip to content

Commit 318fe06

Browse files
committed
Create memory stream in exif fuzzer
At least one segfault observed because temp file creation failed. Switch to using a memory stream, which should be more robust, and more efficient for that matter.
1 parent 28a30f7 commit 318fe06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sapi/fuzzer/fuzzer-exif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
4545
return 0;
4646
}
4747

48-
stream = php_stream_fopen_tmpfile();
48+
stream = php_stream_memory_create(TEMP_STREAM_DEFAULT);
4949
php_stream_write(stream, (const char *) Data, Size);
5050
php_stream_to_zval(stream, &stream_zv);
5151

0 commit comments

Comments
 (0)