Skip to content

Commit 7248341

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 bcbc053 commit 7248341

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
@@ -4199,7 +4199,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
41994199
if ('\\' == filename[cnt]) {
42004200
filename[cnt] = '/';
42014201
}
4202-
} while (cnt++ <= filename_len);
4202+
} while (cnt++ < filename_len);
42034203
}
42044204
#endif
42054205

0 commit comments

Comments
 (0)