Closed Bug 1057174 Opened 5 years ago Closed 5 years ago

[WebRTC] |DesktopDeviceInfoImpl::initializ| in desktop_device_info.cc use wrong argument while calling snprintf.

Categories

(Core :: WebRTC, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox33 --- fixed
firefox34 --- fixed

People

(Reporter: ctai, Assigned: ctai)

Details

Attachments

(1 file)

|DesktopDeviceInfoImpl::initializ| in desktop_device_info.cc use wrong argument while calling snprintf. It will cause mochitest fail in local linux machine(but tbpl pass.) I found this bug when I ran mochitest for Bug 1053130.
Comment on attachment 8477124 [details] [diff] [review]
bug-1057174.patch v1.0

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

Hi, Randell,
Could you please review this patch?
Attachment #8477124 - Flags: review?(rjesup)
Attachment #8477124 - Flags: review?(rjesup) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6ddd42718dc

In future, please try to use a commit message that summarizes what the patch is doing rather than restating the problem it's fixing. Thanks!
https://developer.mozilla.org/en-US/docs/Developer_Guide/Committing_Rules_and_Responsibilities#Checkin_comment
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e6ddd42718dc
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
This is failing to build for me on mozilla-beta (FF33):

[ 1396s] In function 'int snprintf(char*, size_t, const char*, ...)',
[ 1396s]     inlined from 'int32_t webrtc::DesktopDeviceInfoImpl::initializeWindowList()' at /home/abuild/rpmbuild/BUILD/mozilla/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_device_info.cc:245:71:
[ 1396s] /usr/include/bits/stdio2.h:65:44: warning: call to int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...) will always overflow destination buffer [enabled by default]

So I guess this should land in 33?
Comment on attachment 8477124 [details] [diff] [review]
bug-1057174.patch v1.0

Building with certain compiler checks enabled warns about:

[ 1396s] In function 'int snprintf(char*, size_t, const char*, ...)',
[ 1396s]     inlined from 'int32_t webrtc::DesktopDeviceInfoImpl::initializeWindowList()' at /home/abuild/rpmbuild/BUILD/mozilla/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_device_info.cc:245:71:
[ 1396s] /usr/include/bits/stdio2.h:65:44: warning: call to int __builtin___snprintf_chk(char*, long unsigned int, int, long unsigned int, const char*, ...) will always overflow destination buffer [enabled by default]

Something which "will always overflow destnation buffer" seems to qualify to cherry pick to FF33?
Attachment #8477124 - Flags: approval-mozilla-beta?
Attachment #8477124 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.