vlad            Wed Aug  6 15:06:24 2003 EDT

  Modified files:              
    /php-src/ext/dbase  dbf_head.c 
  Log:
  Fix for bug 23463. Dbase2 is not supported.
  AFAICT, no newer versions of dbase, even those use
  version byte as a bitmask will ever have it <3.
  
Index: php-src/ext/dbase/dbf_head.c
diff -u php-src/ext/dbase/dbf_head.c:1.12 php-src/ext/dbase/dbf_head.c:1.13
--- php-src/ext/dbase/dbf_head.c:1.12   Tue Apr  1 14:12:32 2003
+++ php-src/ext/dbase/dbf_head.c        Wed Aug  6 15:06:24 2003
@@ -33,6 +33,10 @@
 
        /* build in core info */
        dbh->db_fd = fd;
+       if (dbhead.dbh_dbt < 3) {
+               php_error(E_WARNING, "This file appears to be dbase ver. %d. Only 
version 3 and above is supported.", dbhead.dbh_dbt);
+               return NULL;
+       }
        dbh->db_dbt = dbhead.dbh_dbt;
        dbh->db_records = get_long(dbhead.dbh_records);
        dbh->db_hlen = get_short(dbhead.dbh_hlen);



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

Reply via email to