Closed Bug 985858 Opened 10 years ago Closed 10 years ago

Snapshots.cpp:411:21: warning: format string is not a string literal (potentially insecure) [-Wformat-security]

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

New build warning, introduced by bug 962555:
=============
js/src/jit/Snapshots.cpp:411:21: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
         fprintf(fp, ValTypeToString(p.type));
                     ^~~~~~~~~~~~~~~~~~~~~~~
=============

(I'm using clang 3.4 on Linux.)
Blocks: buildwarning
IIRC we can fix this by adding
  "%s",
before the ValTypeToString invocation.
Attached patch fix v1Splinter Review
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8393998 - Flags: review?(nicolas.b.pierron)
Attachment #8393998 - Flags: review?(nicolas.b.pierron) → review+
Or just fputs?
https://hg.mozilla.org/mozilla-central/rev/0d51a9df37b8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: