Skip to content

Commit b97a971

Browse files
cmb69derickr
authored andcommitted
Fix # 79171: heap-buffer-overflow in phar_extract_file
We must not access memory outside of the allocated buffer.
1 parent e73d8e2 commit b97a971

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
@@ -4184,7 +4184,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char *
41844184
if ('\\' == filename[cnt]) {
41854185
filename[cnt] = '/';
41864186
}
4187-
} while (cnt++ <= filename_len);
4187+
} while (cnt++ < filename_len);
41884188
}
41894189
#endif
41904190

0 commit comments

Comments
 (0)