Closed Bug 1231899 Opened 9 years ago Closed 7 years ago

[meta] Investigate how we check the return value of JS_snprintf()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: wuwei, Assigned: wuwei)

References

Details

Attachments

(1 obsolete file)

According to bug 1231581 comment 2, the document for JS_snprintf() is non-consistent with the code. I think we should investigate how we check the return value of JS_snprintf(), to make sure that we were not introducing any (security-related) bugs.
Depends on: 1231900
if the return value of JS_snprintf() equals the buffer size, something had gone wrong. The current fprintf is unreachable, iiuc.
Attachment #8697520 - Flags: review?(nicolas.b.pierron)
Depends on: 1231581
Depends on: 1232100
Depends on: 1232113
Comment on attachment 8697520 [details] [diff] [review]
fix a JS_snprintf return value check in LCovRuntime

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

Thanks :)
Attachment #8697520 - Flags: review?(nicolas.b.pierron) → review+
Keywords: checkin-needed
This failed to apply:

renamed 1231899 -> bug1231899p1.patch
applying bug1231899p1.patch
patching file js/src/vm/CodeCoverage.cpp
Hunk #1 FAILED at 467
1 out of 1 hunks FAILED -- saving rejects to file js/src/vm/CodeCoverage.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh bug1231899p1.patch
Flags: needinfo?(lazyparser)
Keywords: checkin-needed
(In reply to Carsten Book [:Tomcat] from comment #3)
> This failed to apply:
> 
> renamed 1231899 -> bug1231899p1.patch
> applying bug1231899p1.patch
> patching file js/src/vm/CodeCoverage.cpp
> Hunk #1 FAILED at 467
> 1 out of 1 hunks FAILED -- saving rejects to file
> js/src/vm/CodeCoverage.cpp.rej
> patch failed, unable to continue (try -v)
> patch failed, rejects left in working directory
> errors during apply, please fix and qrefresh bug1231899p1.patch

Ah, turns out this bug has been fixed by patches for bug 1219166, so the patch is no longer needed.
Sorry for inconvenience.
Flags: needinfo?(lazyparser)
Comment on attachment 8697520 [details] [diff] [review]
fix a JS_snprintf return value check in LCovRuntime

obsolete this patch, for this bug has been fixed by patches for bug 1219166.
Attachment #8697520 - Attachment is obsolete: true
JS_snprintf doesn't seem to exist any more, so perhaps this bug is obsolete now.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: