cvs: pecl /shp shp.c

From: Date: Sun, 10 Apr 2005 18:13:12 +0000
Subject: cvs: pecl /shp shp.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-2960@lists.php.net to get a copy of this message
andrey Sun Apr 10 14:13:12 2005 EDT Modified files: /pecl/shp shp.c Log: fix potential memory overruns on 64 bit #in zend_parse_parameters() #- "l" use C type long #- "s" use char* + int (for the length) http://cvs.php.net/diff.php/pecl/shp/shp.c?r1=1.2&r2=1.3&ty=u Index: pecl/shp/shp.c diff -u pecl/shp/shp.c:1.2 pecl/shp/shp.c:1.3 --- pecl/shp/shp.c:1.2 Sun Apr 10 13:34:53 2005 +++ pecl/shp/shp.c Sun Apr 10 14:13:12 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: shp.c,v 1.2 2005/04/10 17:34:53 andrey Exp $ */ +/* $Id: shp.c,v 1.3 2005/04/10 18:13:12 andrey Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -133,7 +133,8 @@ PHP_FUNCTION(shp_create) { char *name = NULL; - int name_len, shape_type; + int name_len; + long shape_type; SHPHandle shph; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &name, &name_len, &shape_type) == FAILURE) { @@ -195,7 +196,8 @@ zval *res; SHPHandle shph; SHPObject *shp_obj; - int c_id = -1, ord; + int c_id = -1; + long ord; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &res, &ord) == FAILURE) { RETURN_FALSE; @@ -287,7 +289,8 @@ zval *res_handle = NULL, *res_obj = NULL; SHPObject *shp_obj; SHPHandle shph; - int c_id = -1, entity_n; + int c_id = -1; + long entity_n; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlr", &res_handle, &entity_n, &res_obj) == FAILURE) { RETURN_FALSE;

« previous php.pecl.cvs (#2960) next »