Closed
Bug 494764
Opened 16 years ago
Closed 15 years ago
Conditional jump or move depends on uninitialised value at nsNNTPProtocol::ParseURL()
Categories
(MailNews Core :: Networking: NNTP, defect)
MailNews Core
Networking: NNTP
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0rc1
People
(Reporter: stransky, Assigned: jhorak)
Details
(Keywords: fixed-seamonkey2.0.1)
Attachments
(1 file, 1 obsolete file)
1.21 KB,
patch
|
jcranmer
:
review+
standard8
:
superreview+
standard8
:
approval-thunderbird3+
|
Details | Diff | Splinter Review |
m_newsAction variable is not set in constructor so it can be used uninitialized:
Valgrind output:
==22747== Conditional jump or move depends on uninitialised value(s)
==22747== at 0x5812916: nsNNTPProtocol::ParseURL(nsIURI*, char**, char**, char**) (nsNNTPProtocol.cpp:1385)
==22747== by 0x5814605: nsNNTPProtocol::Initialize(nsIURI*, nsIMsgWindow*) (nsNNTPProtocol.cpp:456)
==22747== by 0x582712A: nsNntpIncomingServer::GetNntpConnection(nsIURI*, nsIMsgWindow*, nsINNTPProtocol**) (nsNntpIncomingServer.cpp:583)
==22747== by 0x5827190: nsNntpIncomingServer::LoadNewsUrl(nsIURI*, nsIMsgWindow*, nsISupports*) (nsNntpIncomingServer.cpp:614)
==22747== by 0x581AD75: nsNntpService::RunNewsUrl(nsIURI*, nsIMsgWindow*, nsISupports*) (nsNntpService.cpp:1267)
==22747== by 0x581B381: nsNntpService::GetNewNews(nsINntpIncomingServer*, char const*, int, nsIUrlListener*, nsIMsgWindow*, nsIURI**) (nsNntpService.cpp:1298)
==22747== by 0x581DBF3: nsMsgNewsFolder::GetNewsMessages(nsIMsgWindow*, int, nsIUrlListener*) (nsNewsFolder.cpp:895)
==22747== by 0x581DCE3: nsMsgNewsFolder::GetNewMessages(nsIMsgWindow*, nsIUrlListener*) (nsNewsFolder.cpp:866)
==22747== by 0x5821C4F: nsMsgNewsFolder::UpdateFolder(nsIMsgWindow*) (nsNewsFolder.cpp:350)
==22747== by 0x41D285E: NS_InvokeByIndex_P (in /usr/lib/thunderbird-3.0b3pre/libxpcom_core.so)
==22747== by 0x5D20DB9: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) (xpcwrappednative.cpp:2450)
==22747== by 0x5D28DFB: XPC_WN_CallMethod(JSContext*, JSObject*, unsigned, int*, int*) (xpcwrappednativejsops.cpp:1583)
Updated•16 years ago
|
Component: General → Networking: News
Product: Thunderbird → MailNews Core
QA Contact: general → networking.news
Reporter | ||
Comment 1•16 years ago
|
||
Initializes m_newsAction in nsNNTPProtocol::nsNNTPProtocol()
Reporter | ||
Comment 2•16 years ago
|
||
Comment on attachment 379554 [details] [diff] [review]
patch
Can you check it please?
Attachment #379554 -
Flags: review?(dmose)
Comment 3•16 years ago
|
||
Assigning to Stransky; since he was kind enough to provide a patch.
Assignee: nobody → stransky
Updated•16 years ago
|
Attachment #379554 -
Flags: review?(dmose) → review?(Pidgeot18)
Comment 4•16 years ago
|
||
Comment on attachment 379554 [details] [diff] [review]
patch
Switching reviewer to jcranmer, as he's the News module owner...
Comment 5•16 years ago
|
||
(In reply to comment #4)
> (From update of attachment 379554 [details] [diff] [review])
> Switching reviewer to jcranmer, as he's the News module owner...
Dan where can this bit of information be found ?
Comment 6•16 years ago
|
||
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 379554 [details] [diff] [review] [details])
> > Switching reviewer to jcranmer, as he's the News module owner...
>
> Dan where can this bit of information be found ?
I've just added a link set here: https://developer.mozilla.org/en/comm-central#Requirements - mailnews specific rules apply to this patch.
Updated•16 years ago
|
Attachment #379554 -
Flags: review?(Pidgeot18) → review-
Comment 7•16 years ago
|
||
Comment on attachment 379554 [details] [diff] [review]
patch
I don't think this is the right way to go--protocol objects can be reused, so if the value is not getting initialized, it will have the wrong value on the next URL being run.
A better option would be to move the initialization of m_newsAction (the proper one, m_runningUrl->GetNewsAction) before the call to ParseURL in Initialize.
Reporter | ||
Updated•16 years ago
|
Assignee: stransky → jhorak
Assignee | ||
Comment 8•15 years ago
|
||
Moving m_newsAction initialization into Initialize method. Please could you look into it?
Attachment #404820 -
Flags: review?
Assignee | ||
Updated•15 years ago
|
Attachment #404820 -
Flags: review? → review?(Pidgeot18)
Updated•15 years ago
|
Attachment #404820 -
Flags: review?(Pidgeot18) → review+
Comment 9•15 years ago
|
||
Comment on attachment 404820 [details] [diff] [review]
Patch v2: moved to Initialize method
> https://developer.mozilla.org/en/comm-central#Requirements - mailnews specific
> rules apply to this patch.
sr is required - so requesting it.
Attachment #404820 -
Flags: superreview?(bugzilla)
Comment 10•15 years ago
|
||
Comment on attachment 404820 [details] [diff] [review]
Patch v2: moved to Initialize method
Sorry for the delay.
In future it is useful if you could include -p in the diff options when creating the patch to submit - it gives an idea of which functions code is in, which makes it easier to review the patch.
sr=Standard8. Also a=Standard8 for checkin to the code base during the TB 3 lockdown period.
I'm assuming you don't have checkin privs, so I'll do this for you in a while.
Attachment #404820 -
Flags: superreview?(bugzilla)
Attachment #404820 -
Flags: superreview+
Attachment #404820 -
Flags: approval-thunderbird3+
Updated•15 years ago
|
Attachment #379554 -
Attachment is obsolete: true
Comment 11•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
OS: Linux → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0rc1
Updated•15 years ago
|
Keywords: fixed-seamonkey2.0.1
You need to log in
before you can comment on or make changes to this bug.
Description
•