! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-netload-plugin crashed with SIGSEGV in g_strlcat()
Status:
RESOLVED: DUPLICATE
Product:
Xfce4-netload-plugin
Component:
General

Comments

Description Lionel Le Folgoc 2012-11-02 13:35:18 CET
Created attachment 4706 
stacktrace

Hi,

In format_byte_humanreadable (), the code uses uidx < sizeof(unit_names) to check that a later unit_names[uidx] won't do an out of bounds access. But it doesn't work, if number_displayed is very big it will crash (because sizeof(unit_names) is greater than the number of elements in the array).

I think it should be G_N_ELEMENTS(unit_names) instead.

Thanks.
Comment 1 Lionel Le Folgoc 2012-11-02 13:35:47 CET
Created attachment 4707 
Proposed patch
Comment 2 Mike Massonnet editbugs 2014-11-02 13:31:41 CET
nope, but the stringsize was actually wrong cf. bug #9172

*** This bug has been marked as a duplicate of bug 9172 ***

Bug #9443

Reported by:
Lionel Le Folgoc
Reported on: 2012-11-02
Last modified on: 2014-11-02

People

Assignee:
Florian Rivoal
CC List:
1 user

Version

Version:
unspecified

Attachments

stacktrace (11.90 KB, text/plain)
2012-11-02 13:35 CET , Lionel Le Folgoc
no flags
Proposed patch (518 bytes, patch)
2012-11-02 13:35 CET , Lionel Le Folgoc
no flags

Additional information