com php-src: Fix uninitialized variable: ext/phar/phar_intern al.h
| From: | Nikita Popov | Date: | Wed, 19 Jun 2019 13:34:51 +0000 |
| Subject: | com php-src: Fix uninitialized variable: ext/phar/phar_intern al.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106904@lists.php.net to get a copy of this message | ||
Commit: c10cb47b5f0a4d58d37b1974c993f5a3c09b1997
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 19 Jun 2019 15:34:51 +0200
Parents: ea97fc9c1f78c24b59031d8377461976d281972c
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c10cb47b5f0a4d58d37b1974c993f5a3c09b1997
Log:
Fix uninitialized variable
I mistakenly moved len1 initialization into the conditional as well.
Changed paths:
M ext/phar/phar_internal.h
Diff:
diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h
index 0ab7fb9...10be6d4 100644
--- a/ext/phar/phar_internal.h
+++ b/ext/phar/phar_internal.h
@@ -511,8 +511,8 @@ static inline void phar_set_inode(phar_entry_info *entry) /* {{{ */
tmp_len = MIN(MAXPATHLEN, entry->filename_len + entry->phar->fname_len);
+ len1 = MIN(entry->phar->fname_len, tmp_len);
if (entry->phar->fname) {
- len1 = MIN(entry->phar->fname_len, tmp_len);
memcpy(tmp, entry->phar->fname, len1);
}