Closed Bug 1371626 Opened 7 years ago Closed 7 years ago

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=]

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

Details

Attachments

(1 file)

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 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+
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
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Assignee: nobody → sledru
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: