diff options
| author | Vlad Krupin <vlad@php.net> | 2003-08-06 19:06:24 +0000 |
|---|---|---|
| committer | Vlad Krupin <vlad@php.net> | 2003-08-06 19:06:24 +0000 |
| commit | 5636f9614764375116332cf2f8113bab96d6e2a1 (patch) | |
| tree | 093a31494c7c4df51549e0b04323f264a42a2460 /ext/dbase | |
| parent | 00d42286ecbe3a049ed3ef79a1d3f854e652249a (diff) | |
| download | php-git-5636f9614764375116332cf2f8113bab96d6e2a1.tar.gz | |
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.
Diffstat (limited to 'ext/dbase')
| -rw-r--r-- | ext/dbase/dbf_head.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c index 9ec1f40d6c..7a5d071a17 100644 --- a/ext/dbase/dbf_head.c +++ b/ext/dbase/dbf_head.c @@ -33,6 +33,10 @@ dbhead_t *get_dbf_head(int fd) /* 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); |
