diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-08-12 00:58:52 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-08-12 00:58:52 +0000 |
commit | 93bcd55eafbcf2a49e8963c3475d5a7b1fbc8c53 (patch) | |
tree | 981e9591cd93532e591400b35b595735a6eee0b7 /ext/sybase/php_sybase_db.c | |
parent | 3652ab6032819e4854ae607fe8084cd129791983 (diff) | |
download | php-git-93bcd55eafbcf2a49e8963c3475d5a7b1fbc8c53.tar.gz |
emalloc -> safe_emalloc
Diffstat (limited to 'ext/sybase/php_sybase_db.c')
-rw-r--r-- | ext/sybase/php_sybase_db.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index 71e8a1f19c..b2eed1c88d 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -827,13 +827,13 @@ PHP_FUNCTION(sybase_query) RETURN_TRUE; } - column_types = (int *) emalloc(sizeof(int) * num_fields); + column_types = (int *) safe_emalloc(sizeof(int), num_fields, 0); for (i=0; i<num_fields; i++) { column_types[i] = coltype(i+1); } result = (sybase_result *) emalloc(sizeof(sybase_result)); - result->data = (pval ***) emalloc(sizeof(pval **)*SYBASE_ROWS_BLOCK); + result->data = (pval ***) safe_emalloc(sizeof(pval **), SYBASE_ROWS_BLOCK, 0); result->sybase_ptr = sybase_ptr; result->cur_field=result->cur_row=result->num_rows=0; result->num_fields = num_fields; @@ -844,7 +844,7 @@ PHP_FUNCTION(sybase_query) if (result->num_rows > blocks_initialized*SYBASE_ROWS_BLOCK) { result->data = (pval ***) erealloc(result->data,sizeof(pval **)*SYBASE_ROWS_BLOCK*(++blocks_initialized)); } - result->data[i] = (pval **) emalloc(sizeof(pval *)*num_fields); + result->data[i] = (pval **) safe_emalloc(sizeof(pval *), num_fields, 0); for (j=1; j<=num_fields; j++) { php_sybase_get_column_content(sybase_ptr, j, &result->data[i][j-1], column_types[j-1]); if (!php_sybase_module.compatability_mode) { @@ -862,7 +862,7 @@ PHP_FUNCTION(sybase_query) } result->num_rows = DBCOUNT(sybase_ptr->link); - result->fields = (sybase_field *) emalloc(sizeof(sybase_field)*num_fields); + result->fields = (sybase_field *) safe_emalloc(sizeof(sybase_field), num_fields, 0); j=0; for (i=0; i<num_fields; i++) { char *fname = dbcolname(sybase_ptr->link,i+1); |