felipe          Fri Jun 12 14:00:10 2009 UTC

  Modified files:              
    /php-src/ext/exif   exif.c 
  Log:
  - Sync with 5_3
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.214&r2=1.215&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.214 php-src/ext/exif/exif.c:1.215
--- php-src/ext/exif/exif.c:1.214       Fri Jun 12 13:27:39 2009
+++ php-src/ext/exif/exif.c     Fri Jun 12 14:00:10 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: exif.c,v 1.214 2009/06/12 13:27:39 felipe Exp $ */
+/* $Id: exif.c,v 1.215 2009/06/12 14:00:10 felipe Exp $ */
 
 /*  ToDos
  *
@@ -138,7 +138,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.214 2009/06/12 13:27:39 felipe Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.215 2009/06/12 14:00:10 felipe Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -3888,24 +3888,25 @@
 PHP_FUNCTION(exif_read_data)
 {
        zval **p_name;
-       int i, ret, sections_needed=0;
+       int i, ret, sections_needed=0, p_sections_needed_len;
        zend_bool sub_arrays=0, read_thumbnail=0, read_all=0;
        image_info_type ImageInfo;
-       char tmp[64], *sections_str=0, *s;
+       char tmp[64], *sections_str = NULL, *p_sections_needed = NULL, *s;
        char *filename;
        int filename_len, sections_str_len = 0;
 
-       memset(&ImageInfo, 0, sizeof(ImageInfo));
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|sbb", &p_name, 
&sections_str, &sections_str_len, &sub_arrays, &read_thumbnail) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|sbb", &p_name, 
&p_sections_needed, &p_sections_needed_len, &sub_arrays, &read_thumbnail) == 
FAILURE) {
                return;
        }
 
        if (php_stream_path_param_encode(p_name, &filename, &filename_len, 
REPORT_ERRORS, FG(default_context)) == FAILURE) {
                return;
        }
+       
+       memset(&ImageInfo, 0, sizeof(ImageInfo));
 
-       if (sections_needed) {
+       if (p_sections_needed) {
+               spprintf(&sections_str, 0, ",%s,", p_sections_needed);
                /* sections_str DOES start with , and SPACES are NOT allowed in 
names */
                s = sections_str;
                while(*++s) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to