dom/plugins/test/testplugin/nptest.cpp:459:13: error: '%x' directive writing between 1 and 8 bytes into a region of size 7 [-Werror=format-overflow=]

RESOLVED FIXED in Firefox 55

Status

()

Core
Plug-ins
RESOLVED FIXED
7 months ago
6 months ago

People

(Reporter: sylvestre, Assigned: sylvestre)

Tracking

(Blocks: 1 bug)

Trunk
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

7 months ago
Fails the build with --enable-warnings-as-errors

In file included from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dom/plugins/test/testplugin/javaplugin/Unified_cpp_javaplugin0.cpp:11:0:
/root/firefox-gcc-last/dom/plugins/test/testplugin/nptest.cpp: In function 'void sendBufferToFrame(NPP)':
/root/firefox-gcc-last/dom/plugins/test/testplugin/nptest.cpp:459:13: error: '%x' directive writing between 1 and 8 bytes into a region of size 7 [-Werror=format-overflow=]
 static void sendBufferToFrame(NPP instance)
             ^~~~~~~~~~~~~~~~~
/root/firefox-gcc-last/dom/plugins/test/testplugin/nptest.cpp:459:13: note: using the range [0, 4294967295] for directive argument
/root/firefox-gcc-last/dom/plugins/test/testplugin/nptest.cpp:531:18: note: 'sprintf' output between 3 and 10 bytes into a destination of size 8
           sprintf(hex, "%%%x", ascii);
           ~~~~~~~^~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Comment hidden (mozreview-request)

Comment 2

7 months ago
mozreview-review
Comment on attachment 8876098 [details]
Bug 1371626 - Fix a format-overflow issue with gcc 7.1

https://reviewboard.mozilla.org/r/147524/#review151998
Attachment #8876098 - Flags: review?(benjamin) → review+

Comment 3

7 months ago
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e925cbe7976
Fix a format-overflow issue with gcc 7.1 r=bsmedberg
https://hg.mozilla.org/mozilla-central/rev/7e925cbe7976
Status: NEW → RESOLVED
Last Resolved: 7 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
(Assignee)

Updated

6 months ago
Assignee: nobody → sledru
status-firefox57: affected → ---
You need to log in before you can comment on or make changes to this bug.