From: Greg Beaver Date: Wed, 7 May 2008 17:35:20 +0000 (+0000) Subject: fix tar extension detection in open code X-Git-Tag: RELEASE_2_0_0b1~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0773c7f6a2d41487e0307976efcab262fb340100;p=php fix tar extension detection in open code --- diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 7288b3bbff..343aea58ef 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -378,7 +378,7 @@ int phar_open_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, i myphar->ext = memchr(p + 1, '.', (myphar->fname + fname_len) - p - 1); } if (myphar->ext) { - myphar->ext_len = (myphar->fname + fname_len) - p; + myphar->ext_len = (myphar->fname + fname_len) - myphar->ext; } } myphar->fp = fp;