widget/cocoa/TextInputHandler.mm:3842:5 [-Warray-bounds] array index 1 is past the end of the array (which contains 1 element)

RESOLVED DUPLICATE of bug 925031

Status

()

RESOLVED DUPLICATE of bug 925031
5 years ago
5 years ago

People

(Reporter: cpeterson, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
When compiling a 32-bit debug build for OS X, I saw the following warning:

widget/cocoa/TextInputHandler.mm:3842:5 [-Warray-bounds] array index 1 is past the end of the array (which contains 1 element)

from the following code:

    InterfaceTypeList supportedServices;
    supportedServices[0] = kTextServiceDocumentInterfaceType;
    supportedServices[1] = kUnicodeDocumentInterfaceType;
    ::NewTSMDocument(2, supportedServices, &mPluginTSMDoc, 0);

because InterfaceTypeList is typedef'd as:

    typedef OSType InterfaceTypeList[1];

in http://webnnel.googlecode.com/svn/trunk/lib/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/TextServices.h
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 925031
Marking this as security sensitive -- hopefully only temporarily.
Group: core-security
The bug of which this is a dup is no longer security-sensitive.
Group: core-security
You need to log in before you can comment on or make changes to this bug.