diff options
author | dimi <dlee@mozilla.com> | 2016-03-04 16:00:44 +0800 |
---|---|---|
committer | dimi <dlee@mozilla.com> | 2016-03-04 16:00:44 +0800 |
commit | 6a99c774353ac6141b05f0011552b4962f7bc2b6 (patch) | |
tree | 53f0ab2194dff1ba6db4813c901ad58638553f15 /lib/dbm/src | |
parent | 2ad91253ddf89f832165888a71067ee2fe002e07 (diff) | |
download | nss-hg-6a99c774353ac6141b05f0011552b4962f7bc2b6.tar.gz |
Bug 1233730 - [CID 222373][CID 222374] sizeof errors in hash.c, r=franziskus
Diffstat (limited to 'lib/dbm/src')
-rw-r--r-- | lib/dbm/src/hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dbm/src/hash.c b/lib/dbm/src/hash.c index 5af4db73d..b80aad4d3 100644 --- a/lib/dbm/src/hash.c +++ b/lib/dbm/src/hash.c @@ -1020,7 +1020,7 @@ __expand_table(HTAB *hashp) hashp->DSIZE = dirsize << 1; } if ((hashp->dir[new_segnum] = - (SEGMENT)calloc((size_t)hashp->SGSIZE, sizeof(SEGMENT))) == NULL) + (SEGMENT)calloc((size_t)hashp->SGSIZE, sizeof(BUFHEAD *))) == NULL) return (-1); hashp->exsegs++; hashp->nsegs++; @@ -1091,13 +1091,13 @@ alloc_segs( register SEGMENT store; if ((hashp->dir = - (SEGMENT *)calloc((size_t)hashp->DSIZE, sizeof(SEGMENT *))) == NULL) { + (SEGMENT *)calloc((size_t)hashp->DSIZE, sizeof(SEGMENT))) == NULL) { errno = ENOMEM; return (-1); } /* Allocate segments */ if ((store = - (SEGMENT)calloc((size_t)nsegs << hashp->SSHIFT, sizeof(SEGMENT))) == NULL) { + (SEGMENT)calloc((size_t)nsegs << hashp->SSHIFT, sizeof(BUFHEAD *))) == NULL) { errno = ENOMEM; return (-1); } |