Closed
Bug 982302
Opened 11 years ago
Closed 11 years ago
Braces are missing in nsBaseURLParser::ParseURL
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
1.17 KB,
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140306171728
Actual results:
In nsURLParsers.cpp,
http://dxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsURLParsers.cpp#43
> #define OFFSET_RESULT(component, offset) \
> PR_BEGIN_MACRO \
> if (component ## Pos) \
> *component ## Pos += offset; \
> PR_END_MACRO
http://dxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsURLParsers.cpp#150 , nsBaseURLParser::ParseURL
> if (authorityLen || pathLen)
> ParseAfterScheme(spec, specLen,
> authorityPos, authorityLen,
> pathPos, pathLen);
> OFFSET_RESULT(authority, offset);
> OFFSET_RESULT(path, offset);
OFFSET_RESULT is called regardless of if-condition.
But if neither authorityLen nor pathLen is present,
also authorityPos and pathPos is not present in any case.
Expected results:
So, the code should be following:
> if (authorityLen || pathLen) {
> ParseAfterScheme(spec, specLen,
> authorityPos, authorityLen,
> pathPos, pathLen);
> OFFSET_RESULT(authority, offset);
> OFFSET_RESULT(path, offset);
> }
Assignee | ||
Updated•11 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8389414 -
Flags: review?(mcmanus)
Updated•11 years ago
|
Attachment #8389414 -
Flags: review?(mcmanus) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Thank you for reviewing!
Could you push the patch to try server?
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Thank you again!
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Assignee: nobody → arai_a
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•