Closed
Bug 1344223
Opened 6 years ago
Closed 6 years ago
unchecked result of mktemp before passing to fdopen
Categories
(Core :: XPCOM, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: jesup, Assigned: jesup)
Details
Attachments
(1 file)
987 bytes,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
Long-standing minor bug
** CID 1307869: Error handling issues (NEGATIVE_RETURNS)
/xpcom/build/LateWriteChecks.cpp: 161 in LateWriteObserver::Observe(mozilla::IOInterposeObserver::Observation &)()
________________________________________________________________________________________________________
*** CID 1307869: Error handling issues (NEGATIVE_RETURNS)
/xpcom/build/LateWriteChecks.cpp: 161 in LateWriteObserver::Observe(mozilla::IOInterposeObserver::Observation &)()
155 MOZ_CRASH("Um, how did we get here?");
156 }
157
158 stream = _fdopen(fd, "w");
159 #else
160 int fd = mkstemp(name);
>>> CID 1307869: Error handling issues (NEGATIVE_RETURNS)
>>> "fd" is passed to a parameter that cannot be negative.
161 stream = fdopen(fd, "w");
162 #endif
163
164 SHA1Stream sha1Stream(stream);
165
166 size_t numModules = stack.GetNumModules();
Assignee | ||
Comment 1•6 years ago
|
||
MozReview-Commit-ID: 1z3cQXioTXP
Assignee | ||
Updated•6 years ago
|
Attachment #8843326 -
Flags: review?(nfroyd)
![]() |
||
Comment 2•6 years ago
|
||
Comment on attachment 8843326 [details] [diff] [review] error-check mkstemp() Review of attachment 8843326 [details] [diff] [review]: ----------------------------------------------------------------- I guess this is consistent with the Windows code, but it seems like we should just return in both cases if we can't get a temp file. Anyway, r=me.
Attachment #8843326 -
Flags: review?(nfroyd) → review+
Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/acf2c7b496d5 error-check mkstemp() r=froyd
![]() |
||
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/acf2c7b496d5
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•