~ubuntu-branches/ubuntu/breezy/koffice/breezy-security

« back to all changes in this revision

Viewing changes to kword/kwframestylemanager.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-10-11 14:49:50 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051011144950-lwpngbifzp8nk0ds
Tags: 1:1.4.1-0ubuntu7
* SECURITY UPDATE: fix heap based buffer overflow in the RTF importer of KWord
* Opening specially crafted RTF files in KWord can cause
  execution of abitrary code.
* Add kubuntu_01_rtfimport_heap_overflow.diff
* References:
  CAN-2005-2971
  CESA-2005-005
  http://www.koffice.org/security/advisory-20051011-1.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "kwframestylemanager.moc"
22
22
#include "kwimportstyledia.h"
23
23
 
24
 
#include <kwdoc.h>
 
24
#include "kwdoc.h"
 
25
#include "framedia.h" // for KWBrushStylePreview
 
26
 
25
27
#include <koParagDia.h>
26
 
#include <framedia.h>
27
28
 
28
29
#include <kcolorbutton.h>
29
30
#include <klocale.h>
176
177
    m_stylesList = new QListBox( frame1, "stylesList" );
177
178
    for ( ; style.current() ; ++style )
178
179
    {
179
 
        m_stylesList->insertItem( style.current()->translatedName() );
 
180
        m_stylesList->insertItem( style.current()->displayName() );
180
181
        m_frameStyles.append( new KWFrameStyleListItem( style.current(),new KWFrameStyle(*style.current())) );
181
182
        m_styleOrder<<style.current()->name();
182
183
    }
185
186
 
186
187
 
187
188
    m_moveUpButton = new QPushButton( frame1, "moveUpButton" );
188
 
    m_moveUpButton->setPixmap( BarIcon( "up", KIcon::SizeSmall ) );
 
189
    m_moveUpButton->setIconSet( SmallIconSet( "up" ) );
189
190
    connect( m_moveUpButton, SIGNAL( clicked() ), this, SLOT( moveUpStyle() ) );
190
191
    frame1Layout->addWidget( m_moveUpButton, 1, 1 );
191
192
 
192
193
    m_moveDownButton = new QPushButton( frame1, "moveDownButton" );
193
 
    m_moveDownButton->setPixmap( BarIcon( "down", KIcon::SizeSmall ) );
 
194
    m_moveDownButton->setIconSet( SmallIconSet( "down" ) );
194
195
    connect( m_moveDownButton, SIGNAL( clicked() ), this, SLOT( moveDownStyle() ) );
195
196
    frame1Layout->addWidget( m_moveDownButton, 1, 0 );
196
197
 
308
309
        it.current()->update();
309
310
    }
310
311
 
311
 
    m_nameString->setText(m_currentFrameStyle->translatedName());
 
312
    m_nameString->setText(m_currentFrameStyle->displayName());
312
313
 
313
314
    // update delete button (can't delete first style);
314
315
    m_deleteButton->setEnabled(m_stylesList->currentItem() != 0);
358
359
    for ( ; style.current() ; ++style )
359
360
    {
360
361
        noSignals=true;
361
 
        m_stylesList->insertItem( style.current()->translatedName() );
 
362
        m_stylesList->insertItem( style.current()->displayName() );
362
363
        m_frameStyles.append( new KWFrameStyleListItem( 0L,new KWFrameStyle(*style.current())) );
363
364
        m_styleOrder<<style.current()->name();
364
365
        noSignals=false;