Closed
Bug 198622
Opened 22 years ago
Closed 22 years ago
redundant calls to memset in freebl
Categories
(NSS :: Libraries, enhancement, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.8
People
(Reporter: bugz, Assigned: bugz)
Details
(Whiteboard: 3.3.5)
Attachments
(2 files)
692 bytes,
patch
|
wtc
:
review+
nelson
:
superreview+
|
Details | Diff | Splinter Review |
1.04 KB,
patch
|
wtc
:
review+
nelson
:
superreview+
|
Details | Diff | Splinter Review |
The function alg_fips186_1_x3_1 zeroes a SHA1Context, then calls SHA1_Begin,
which does the same thing. The first call should be removed.
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #118039 -
Flags: review?(nelsonb)
Comment 2•22 years ago
|
||
Comment on attachment 118039 [details] [diff] [review]
remove redundant call to memset
r=wtc.
Attachment #118039 -
Flags: superreview?(nelsonb)
Attachment #118039 -
Flags: review?(nelsonb)
Attachment #118039 -
Flags: review+
Assignee | ||
Comment 3•22 years ago
|
||
Morphing this bug. There are apparently multiple locations where redundant
memset calls are made in freebl. Might as well handle them all here.
The next two are in MD5_NewContext and SHA1_NewContext. Both use PORT_ZAlloc.
However, before the contexts can be used, MD5_Begin and SHA1_Begin must be
called. Both of those functions use memset/memcpy/assignment to initialize all
of the context's fields. So the ZAlloc in NewContext is redundant.
Summary: PRNG code duplicates calls to memset → redundant calls to memset in freebl
Assignee | ||
Comment 4•22 years ago
|
||
Note that in sha512.c, the NewContext functions do not use ZNew, so only
sha_fast.c needed the change.
Assignee | ||
Updated•22 years ago
|
Attachment #118067 -
Flags: review?(wtc)
Updated•22 years ago
|
Attachment #118039 -
Flags: superreview?(nelsonb) → superreview+
Comment 5•22 years ago
|
||
Comment on attachment 118067 [details] [diff] [review]
remove more redundant memsets
r=wtc. Please change _Begin to SHA1_Begin and MD5_Begin when
you check it in.
Attachment #118067 -
Flags: review?(wtc) → review+
Comment 6•22 years ago
|
||
Comment on attachment 118067 [details] [diff] [review]
remove more redundant memsets
I've reviewed these changes. r=nbb. Ian, maybe you should ask Wan-Teh to
superreview them.
Comment 7•22 years ago
|
||
Comment on attachment 118067 [details] [diff] [review]
remove more redundant memsets
I think wtc and I both marked this bug r= about the same time. sr=nelsonb
Attachment #118067 -
Flags: superreview+
Assignee | ||
Comment 8•22 years ago
|
||
Thanks for the reviews. Checked in; marking fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•22 years ago
|
Priority: -- → P3
Target Milestone: --- → 3.8
Assignee | ||
Updated•22 years ago
|
Whiteboard: 3.3.5
You need to log in
before you can comment on or make changes to this bug.
Description
•