Bug 100021 - format argument issues in process.cxx and backtrace.c
Summary: format argument issues in process.cxx and backtrace.c
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All Solaris
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0 target:5.2.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 08:15 UTC by Richard PALO
Modified: 2016-09-26 10:24 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
for backtrace.c (482 bytes, patch)
2016-05-24 08:16 UTC, Richard PALO
Details
for process.cxx (452 bytes, patch)
2016-05-24 08:16 UTC, Richard PALO
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard PALO 2016-05-24 08:15:49 UTC
building 5.1.3.2 I noticed the following:
...
[build CXX] sal/osl/unx/time.cxx
/tmp/pkgsrc/misc/libreoffice/work/libreoffice-5.1.3.2/sal/osl/unx/process.cxx: In function 'oslProcessError osl_getProcessInfo(oslProcess, oslProcessData, oslProcessInfo*)':
/tmp/pkgsrc/misc/libreoffice/work/libreoffice-5.1.3.2/sal/osl/unx/process.cxx:1026:53: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'pid_t {aka long int}' [-Wformat=]
         snprintf(name, sizeof(name), "/proc/%u", pid);
                                                     ^
[build CXX] sal/osl/unx/salinit.cxx
[build CXX] sal/osl/unx/uunxapi.cxx
[build C  ] sal/osl/unx/backtrace.c
[build CXX] sal/osl/unx/interlck.cxx
[build CXX] sal/textenc/context.cxx
/tmp/pkgsrc/misc/libreoffice/work/libreoffice-5.1.3.2/sal/osl/unx/backtrace.c: In function 'backtrace_symbols_fd':
/tmp/pkgsrc/misc/libreoffice/work/libreoffice-5.1.3.2/sal/osl/unx/backtrace.c:121:13: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'void *' [-Wformat=]
             fprintf( fp, "[0x%x]\n", *pFramePtr );
             ^
...

relative simple, patches to be attached.
Comment 1 Richard PALO 2016-05-24 08:16:19 UTC
Created attachment 125257 [details]
for backtrace.c
Comment 2 Richard PALO 2016-05-24 08:16:43 UTC
Created attachment 125258 [details]
for process.cxx
Comment 3 Commit Notification 2016-05-30 09:22:01 UTC
Richard PALO committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=acbbb01940588604de965c4fcef64b2e17473fe6

tdf#100021 - format argument issue in process.cxx

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2016-06-07 08:37:36 UTC
Richard PALO committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b09eb27b7a52d2abd9bdbf01b4532f23279c6edc&h=libreoffice-5-2

tdf#100021 - format argument issue in process.cxx

It will be available in 5.2.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Buovjaga 2016-08-02 12:29:51 UTC
Richard: can the status be set to FIXED?