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

RESOLVED FIXED in mozilla33

Status

()

Core
Networking: DNS
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: erahm, Assigned: badescunicu, Mentored)

Tracking

({coverity})

Trunk
mozilla33
coverity
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CID 1221196][CID 1221195])

Attachments

(1 attachment)

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@gmail.com
(Assignee)

Comment 2

3 years ago
Created attachment 8444167 [details] [diff] [review]
rev1 - fix resolve accessing temporary variable
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+
(Assignee)

Updated

3 years ago
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
(Assignee)

Comment 6

3 years ago
Thanks for the tip, Ryan!
https://hg.mozilla.org/mozilla-central/rev/9f8a077acb66
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.