From: Masahiro KAJIURA Date: Sat, 5 Dec 1998 14:14:54 +0000 (+0900) Subject: avoid garbage in db->dirbuf X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ef0d4a0c84e834e36cb35cd27088bd537edcdac;p=p5sagit%2Fp5-mst-13.2.git avoid garbage in db->dirbuf Message-Id: <199812050514.OAA23268@toshiba.co.jp> Subject: SDBM bug p4raw-id: //depot/perl@2819 --- diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c index 637fbe9..c147e45 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;