Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/.patch Secret

Created December 26, 2018 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/2a2c1e3cdcd3a6b8616e1b00e7c19bc5 to your computer and use it in GitHub Desktop.
Save cmb69/2a2c1e3cdcd3a6b8616e1b00e7c19bc5 to your computer and use it in GitHub Desktop.
PHP bug #77247
ext/phar/phar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 4d5988eaa9..812720a011 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -2026,7 +2026,7 @@ next_extension:
}
while (pos != filename && (*(pos - 1) == '/' || *(pos - 1) == '\0')) {
- pos = memchr(pos + 1, '.', filename_len - (pos - filename) + 1);
+ pos = memchr(pos + 1, '.', filename_len - (pos - filename) - 1);
if (!pos) {
return FAILURE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment