Closed Bug 620390 Opened 14 years ago Closed 14 years ago

useless null check of host = flat.get() in nsStandardURL::SetHost

Categories

(Core :: Networking, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug)

Details

(Keywords: coverity)

Attachments

(1 file, 1 obsolete file)

1415 nsStandardURL::SetHost(const nsACString &input) 1420 const char *host = flat.get(); null safe: 1431 if (host && strlen(host) < flat.Length()) 1432 return NS_ERROR_MALFORMED_URI; // found embedded null not null safe: 1436 if (strchr(host, ' ')) 1437 return NS_ERROR_MALFORMED_URI; null safe: 1442 if (!(host && *host)) {
Attached patch patch (obsolete) (deleted) — Splinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #498879 - Flags: review?(cbiesinger)
Attachment #498879 - Flags: approval2.0?
Comment on attachment 498879 [details] [diff] [review] patch flat.get() never returns NULL
Attachment #498879 - Flags: review?(cbiesinger) → review-
Severity: critical → enhancement
Keywords: crash
Summary: crash [@ nsStandardURL::SetHost] when flat.get() returns null → useless null check of host = flat.get() in nsStandardURL::SetHost
Comment on attachment 498879 [details] [diff] [review] patch Mass minusing patch approval that don't have high return. Please renominate if this is more important for 2.0 than it appears.
Attachment #498879 - Flags: approval2.0? → approval2.0-
Attached patch remove null checks (deleted) — Splinter Review
Attachment #498879 - Attachment is obsolete: true
Attachment #513053 - Flags: review?(cbiesinger)
Comment on attachment 513053 [details] [diff] [review] remove null checks _please_ diff with more context
Attachment #513053 - Flags: review?(cbiesinger) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: