Closed Bug 333693 Opened 18 years ago Closed 18 years ago

Hopefully useless comparison in nsFtpState::Init

Categories

(Core Graveyard :: Networking: FTP, defect)

x86
Linux
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: timeless, Assigned: sciguyryan)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file)

If i'm wrong, this is a crash. If i'm right, can save a comoparison by removing the first null check. Since darin wrote the latest string class, he can confirm :).
Assignee: darin → nobody
Yeah, the MOZILLA_INTERNAL_API version of BeginWriting() never returns null.
Attached patch Patch v1Splinter Review
Remove |fwdPtr| from the comparison and just check for a slash.
Assignee: nobody → sciguyryan+bugzilla
Status: NEW → ASSIGNED
Attachment #239683 - Flags: superreview?(darin)
Attachment #239683 - Flags: review?(bzbarsky)
Comment on attachment 239683 [details] [diff] [review]
Patch v1

I think this is as good as candidate for r+sr as they come.  ;)
Attachment #239683 - Flags: review?(bzbarsky) → review?(darin)
Comment on attachment 239683 [details] [diff] [review]
Patch v1

According to nsTSubstring.h, BeginWriting may return null.
(In reply to comment #4)
> (From update of attachment 239683 [details] [diff] [review] [edit])
> According to nsTSubstring.h, BeginWriting may return null.
> 

Guess that means this null check is required then?
Comment on attachment 239683 [details] [diff] [review]
Patch v1

yeah, i think so.
Attachment #239683 - Flags: superreview?(darin)
Attachment #239683 - Flags: superreview-
Attachment #239683 - Flags: review?(darin)
Attachment #239683 - Flags: review-
By Darin's last comment this bug is probably invalid.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: