Open Bug 1579360 Opened 6 years ago Updated 1 year ago

XPCWrappedNative.cpp: warning about null in JS_sprintf_append

Categories

(Core :: XPConnect, task, P5)

task

Tracking

()

UNCONFIRMED

People

(Reporter: mail, Unassigned)

Details

(Whiteboard: [domcore-bugbash-triaged])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Steps to reproduce:

Compiled with gcc 9.1.0 on Archlinux and Archlinux32.

Actual results:

/build/seamonkey/src/seamonkey-2.49.4/mozilla/js/xpconnect/src/XPCWrappedNative.cpp:
2221:41: error: â directive argument is null [-Werror=format-overflow=]
2221 | name = JS_sprintf_append(name, fmt,
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
2222 | array[i]->GetNameString());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected results:

Fixed with the following patch:

https://git.archlinux32.org/archlinux32/packages/src/branch/master/community/seamonkey/seamonkey-2.49.4-string-fmt.patch

gcc 9 is not a supported compiler for 2.49 and will probably result in a broken and/or crashy build. This is also mozilla Gecko code.

In mozilla-central it seems to be the following line is it:
name =
JS_sprintf_append(std::move(name), fmt, array[i]->GetNameString());

Component: General → XPConnect
Product: SeaMonkey → Core
Version: SeaMonkey 2.49 Branch → unspecified

The priority flag is not set for this bug.
:peterv, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(peterv)
Flags: needinfo?(peterv)
Priority: -- → P5
Severity: normal → S3
Type: defect → task
Whiteboard: [domcore-bugbash-triaged]
You need to log in before you can comment on or make changes to this bug.