Open
Bug 781111
Opened 13 years ago
Updated 3 years ago
Should use nsByteArray::GetBufferPos() for md5 hash string
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
NEW
People
(Reporter: hiro, Unassigned)
Details
(Whiteboard: [patchlove])
Attachments
(1 file)
|
1.34 KB,
patch
|
Irving
:
review+
|
Details | Diff | Splinter Review |
There are some unconditional characters on GetSize().
Attachment #649993 -
Flags: review?(mbanner)
Updated•13 years ago
|
Attachment #649993 -
Flags: review?(mbanner) → review?(irving)
Comment 1•13 years ago
|
||
Comment on attachment 649993 [details] [diff] [review]
Fix
Review of attachment 649993 [details] [diff] [review]:
-----------------------------------------------------------------
I think I understand this change, but it would have been helpful to have a more detailed explanation in the bug report and patch description.
Here's what I think the fix is:
The nsMsgLineBuffer has an allocated size, returned by GetSize(), which is larger than the amount of actual data we read - so the existing code using GetSize() is hashing our line plus all the junk occupying the rest of the buffer
Changing to GetBufferPos() means that we only hash from the beginning of the buffer to the end of the actual data written to the buffer.
My r+ is based on this assumption; if my analysis is not correct please cancel the r+ and add more explanation to the bug.
Attachment #649993 -
Flags: review?(irving) → review+
Comment 2•13 years ago
|
||
Hiro shall we set checking needed for this patch ?
Updated•10 years ago
|
Whiteboard: [patchlove]
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•