Closed Bug 14739 Opened 25 years ago Closed 25 years ago

use of uninitialized variable in nsNNTPProtocol.cpp

Categories

(MailNews Core :: Backend, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: colin, Assigned: mscott)

Details

In mailnews/news/src/nsNNTPProtocol.cpp is a function
named nsNNTPProtocol::CloseSocket(). In this function is
the code:

        if (m_newsgroupList)
        {
                int status;
        nsresult rv;
       /* XXX - how/when to Release() this? */
        rv = m_newsgroupList->FinishXOVERLINE(status,&status);

Notice that status is passed in to FinishXOVERLINE before it has
been given a value.

Colin.
Assignee: phil → mscott
Reassign to mscott, cc sspitzer
Status: NEW → ASSIGNED
Yuck....I have a fix. Will get a code review from sspitzer and I'll try to check
this in today. It's so low risk that we should be able to get it approved.
QA Contact: lchiang → ppandit
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I checked in the fix for this problem.Good catch Colin.
yes, thanks for finding this.
Status: RESOLVED → VERIFIED
The new code is the following. VERIFIED.

if (m_newsgroupList)
4996     {
4997         int status;
4998         nsresult rv;
4999        /* XXX - how/when to Release() this? */
5000         rv = m_newsgroupList->FinishXOVERLINE(0,&status);
5001         NS_ASSERTION(NS_SUCCEEDED(rv), "FinishXOVERLINE failed");
5002     }
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.