Skip to content

Commit 7df594b

Browse files
cmb69smalyshev
authored andcommitted
Fix # 79171: heap-buffer-overflow in phar_extract_file
We must not access memory outside of the allocated buffer.
1 parent 6facfa5 commit 7df594b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/phar/phar_object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4153,7 +4153,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
41534153
if ('\\' == filename[cnt]) {
41544154
filename[cnt] = '/';
41554155
}
4156-
} while (cnt++ <= filename_len);
4156+
} while (cnt++ < filename_len);
41574157
}
41584158
#endif
41594159

0 commit comments

Comments
 (0)