]> granicus.if.org Git - php/commitdiff
@- Fix a crash in dbase_replace_record (Patch by robin.marlow@dps-int.com).
authorJoey Smith <joey@php.net>
Thu, 16 Aug 2001 23:44:10 +0000 (23:44 +0000)
committerJoey Smith <joey@php.net>
Thu, 16 Aug 2001 23:44:10 +0000 (23:44 +0000)
This fixes Bug id #11928.

ext/dbase/dbase.c

index b3d16af2306ce804c6c018fb99e91c84a53efb72..c8dd84ccb665d91d30e605b12b163cfc7cab9314 100644 (file)
@@ -321,7 +321,7 @@ PHP_FUNCTION(dbase_add_record)
    Replaces a record to the database */
 PHP_FUNCTION(dbase_replace_record)
 {
-       pval *dbh_id, *fields, *field, *recnum;
+       pval *dbh_id, *fields, **field, *recnum;
        dbhead_t *dbh;
        int dbh_type;
 
@@ -368,8 +368,8 @@ PHP_FUNCTION(dbase_replace_record)
                        efree(cp);
                        RETURN_FALSE;
                }
-               convert_to_string(field);
-               sprintf(t_cp, cur_f->db_format, field->value.str.val); 
+               convert_to_string_ex(field);
+               sprintf(t_cp, cur_f->db_format, Z_STRVAL_PP(field)); 
                t_cp += cur_f->db_flen;
        }