Skip to content

Commit ffe3e65

Browse files
committed
fix MFHed segfault
1 parent 6ded804 commit ffe3e65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: main/php_open_temporary_file.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ PHPAPI const char* php_get_temporary_directory(void)
194194
#ifdef P_tmpdir
195195
/* Use the standard default temporary directory. */
196196
if (P_tmpdir) {
197-
temporary_directory = P_tmpdir;
197+
temporary_directory = strdup(P_tmpdir);
198198
return temporary_directory;
199199
}
200200
#endif
201201
/* Shouldn't ever(!) end up here ... last ditch default. */
202-
temporary_directory = "/tmp";
202+
temporary_directory = strdup("/tmp");
203203
return temporary_directory;
204204
#endif
205205
}

0 commit comments

Comments
 (0)