Bug 18353 - Segfaults on large number of workspaces
Summary: Segfaults on large number of workspaces
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: WindowMaker (show other bugs)
Version: unstable
Hardware: all Linux
: P2 major
Assignee: vkni
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-26 14:51 MSK by Sir Raorn
Modified: 2009-03-24 14:32 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sir Raorn 2008-12-26 14:51:30 MSK
Будучи собранным со 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 Sir Raorn 2009-03-22 22:32:05 MSK
0.92.0-alt4