Closed
Bug 819927
Opened 13 years ago
Closed 13 years ago
mozilla::Base64{Encode,Decode}() should properly handle the empty string
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: tbsaunde, Assigned: tbsaunde)
References
Details
Attachments
(1 file, 1 obsolete file)
|
1.61 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
PR_Base64{Encode,Decode}() call strlen() on the input if the length is 0, so if you call them with (null, 0, whatever) they crash.
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #690365 -
Flags: review?(ehsan)
Comment 2•13 years ago
|
||
Comment on attachment 690365 [details] [diff] [review]
patch
Review of attachment 690365 [details] [diff] [review]:
-----------------------------------------------------------------
The nsJSEnvironment.cpp changes don't seem related to this patch. Also, you should test this in xpcom/tests/TestBase64.cpp.
Attachment #690365 -
Flags: review?(ehsan) → review-
| Assignee | ||
Comment 3•13 years ago
|
||
> The nsJSEnvironment.cpp changes don't seem related to this patch. Also, you
oops, sorry about that
> should test this in xpcom/tests/TestBase64.cpp.
that is not exactly easy :( mozilla/Base64.h pulls in headers that are only supposed to be for libxul internal code.
Note that test also needed to be patched to work on !windows too.
Comment 4•13 years ago
|
||
Ouch. Well, nm then I guess.
| Assignee | ||
Comment 5•13 years ago
|
||
Attachment #690365 -
Attachment is obsolete: true
Attachment #690526 -
Flags: review?(ehsan)
Updated•13 years ago
|
Attachment #690526 -
Flags: review?(ehsan) → review+
| Assignee | ||
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 8•13 years ago
|
||
I'm confused. Neil tells me BeginReading should never return null, so why was this change necessary?
You need to log in
before you can comment on or make changes to this bug.
Description
•