cvs: php-src /ext/zip/lib zip_get_archive_comment.c
| From: | Pierre-Alain Joye | Date: | Mon, 25 Sep 2006 09:09:53 +0000 |
| Subject: | cvs: php-src /ext/zip/lib zip_get_archive_comment.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-40699@lists.php.net to get a copy of this message | ||
pajoye Mon Sep 25 09:09:53 2006 UTC
Modified files:
/php-src/ext/zip/lib zip_get_archive_comment.c
Log:
- MFB: #38944, freshly created archive has no comment or cdir
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_get_archive_comment.c?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/zip/lib/zip_get_archive_comment.c
diff -u php-src/ext/zip/lib/zip_get_archive_comment.c:1.1
php-src/ext/zip/lib/zip_get_archive_comment.c:1.2
--- php-src/ext/zip/lib/zip_get_archive_comment.c:1.1 Mon Jul 24 16:58:58 2006
+++ php-src/ext/zip/lib/zip_get_archive_comment.c Mon Sep 25 09:09:53 2006
@@ -45,9 +45,11 @@
{
if ((flags & ZIP_FL_UNCHANGED)
|| (za->ch_comment_len == -1)) {
- if (lenp != NULL)
- *lenp = za->cdir->comment_len;
- return za->cdir->comment;
+ if (za->cdir) {
+ if (lenp != NULL)
+ *lenp = za->cdir->comment_len;
+ return za->cdir->comment;
+ }
}
if (lenp != NULL)