Closed Bug 1026656 Opened 10 years ago Closed 10 years ago

nsDNSService::(Async)Resolve accesses temporary variable outside of scope

Categories

(Core :: Networking: DNS, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: erahm, Assigned: badescunicu, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [CID 1221196][CID 1221195])

Attachments

(1 file)

If |localDomain| is true we take a pointer to a temporary variable[1] and then use it out of scope[2].

[1] http://dxr.mozilla.org/mozilla-central/source/netwerk/dns/nsDNSService2.cpp#788
[2] http://dxr.mozilla.org/mozilla-central/source/netwerk/dns/nsDNSService2.cpp#793,813,815
Same issue applies to AsyncResolve [1].

[1] http://dxr.mozilla.org/mozilla-central/source/netwerk/dns/nsDNSService2.cpp#679,684,701,704
Summary: nsDNSService::Resolve accesses temporary variable outside of scope → nsDNSService::(Async)Resolve accesses temporary variable outside of scope
Whiteboard: [CID 1221196] → [CID 1221196][CID 1221195]
Mentor: valentin.gosu
Attachment #8444167 - Flags: review?(valentin.gosu)
Comment on attachment 8444167 [details] [diff] [review]
rev1 - fix resolve accessing temporary variable

Review of attachment 8444167 [details] [diff] [review]:
-----------------------------------------------------------------

Good patch, Nicu!
r?ing :mcmanus, as I am not a Necko peer.
Attachment #8444167 - Flags: review?(valentin.gosu)
Attachment #8444167 - Flags: review?(mcmanus)
Attachment #8444167 - Flags: review+
Comment on attachment 8444167 [details] [diff] [review]
rev1 - fix resolve accessing temporary variable

Review of attachment 8444167 [details] [diff] [review]:
-----------------------------------------------------------------

thanks nicu and valentin
Attachment #8444167 - Flags: review?(mcmanus) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f8a077acb66

Thanks for the patch, Nicu! One small request, for future patches, please make sure you include a commit message when requesting checkin. Thanks!
https://developer.mozilla.org/en-US/docs/Developer_Guide/Committing_Rules_and_Responsibilities#Checkin_comment
Assignee: nobody → badescunicu
Keywords: checkin-needed
Thanks for the tip, Ryan!
https://hg.mozilla.org/mozilla-central/rev/9f8a077acb66
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: