diff options
author | Masahiro KAJIURA <masahiro.kajiura@toshiba.co.jp> | 1998-12-05 23:14:54 +0900 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-07 09:58:45 +0000 |
commit | 9ef0d4a0c84e834e36cb35cd27088bd537edcdac (patch) | |
tree | c6bfc838ba77dd87631b95a2e4b3c0e17f973e0b /ext | |
parent | 60a4e8b21144bbcffcfe7d55c142335fd79d4df9 (diff) | |
download | perl-9ef0d4a0c84e834e36cb35cd27088bd537edcdac.tar.gz |
avoid garbage in db->dirbuf
Message-Id: <199812050514.OAA23268@toshiba.co.jp>
Subject: SDBM bug
p4raw-id: //depot/perl@2819
Diffstat (limited to 'ext')
-rw-r--r-- | ext/SDBM_File/sdbm/sdbm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c index 637fbe98a1..c147e45b43 100644 --- a/ext/SDBM_File/sdbm/sdbm.c +++ b/ext/SDBM_File/sdbm/sdbm.c @@ -437,6 +437,7 @@ setdbit(register DBM *db, register long int dbit) dirb = c / DBLKSIZ; if (dirb != db->dirbno) { + (void) memset(db->dirbuf, 0, DBLKSIZ); if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0 || read(db->dirf, db->dirbuf, DBLKSIZ) < 0) return 0; |