Bug 18353 - Segfaults on large number of workspaces
: Segfaults on large number of workspaces
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/WindowMaker)
: unstable
: all Linux
: P2 major
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2008-12-26 14:51 by
Modified: 2009-03-24 14:32 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-12-26 14:51:30
Будучи собранным со stack protector'ом падает при использовании 9-и рабочих
столов:

void
SendHelperMessage(WScreen *scr, char type, int workspace, char *msg)
{
    char *buffer;
    int len;
    int i;
    char buf[16];

    if (!scr->flags.backimage_helper_launched) {
        return;
    }

    len = (msg ? strlen(msg) : 0) + (workspace >=0 ? 4 : 0) + 1 ;
    buffer = wmalloc(len+5);
    snprintf(buf, len, "%4i", len);
    memcpy(buffer, buf, 4);

Дохнет на sptintf, птому как len получается больше sizeof(buf).
------- Comment #1 From 2009-03-22 22:32:05 -------
0.92.0-alt4