From 3dca799fbb36f0e4143eb1d36e72c80326a3d376 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Mon, 7 Jan 2008 17:18:41 +0000 Subject: [PATCH] fix extension detection for aliases with no extension --- ext/phar/phar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/phar/phar.c b/ext/phar/phar.c index aa566b3942..046a5be406 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1998,10 +1998,10 @@ int phar_detect_phar_fname_ext(const char *filename, int check_length, char **ex } else if (pos_t) { *ext_str = pos_t; *ext_len = 9; - } else if ((pos_p = strstr(filename, ".phar")) != NULL) { + } else if ((pos_p = strstr(filename, ".phar")) != NULL && pos_p[4] != '\0') { *ext_str = pos_p; *ext_len = 5; - } else if ((pos_p = strstr(filename, ".php")) != NULL) { + } else if ((pos_p = strstr(filename, ".php")) != NULL && pos_p[4] != '\0') { *ext_str = pos_p; *ext_len = 4; } else { -- 2.50.1