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

« back to all changes in this revision

Viewing changes to krita/plugins/tool_crop/tool_crop.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:
 
1
/*
 
2
 * tool_crop.cc -- Part of Krita
 
3
 *
 
4
 * Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
19
 */
 
20
#include <stdlib.h>
 
21
#include <vector>
 
22
 
 
23
#include <qpoint.h>
 
24
 
 
25
#include <klocale.h>
 
26
#include <kiconloader.h>
 
27
#include <kinstance.h>
 
28
#include <kmessagebox.h>
 
29
#include <kstandarddirs.h>
 
30
#include <kdebug.h>
 
31
#include <kgenericfactory.h>
 
32
 
 
33
#include <kis_global.h>
 
34
#include <kis_types.h>
 
35
#include <kis_tool_registry.h>
 
36
#include <kis_factory.h>
 
37
#include <kis_view.h>
 
38
 
 
39
#include "tool_crop.h"
 
40
#include "kis_tool_crop.h"
 
41
 
 
42
 
 
43
typedef KGenericFactory<ToolCrop> ToolCropFactory;
 
44
K_EXPORT_COMPONENT_FACTORY( kritatoolcrop, ToolCropFactory( "krita" ) )
 
45
 
 
46
 
 
47
ToolCrop::ToolCrop(QObject *parent, const char *name, const QStringList &)
 
48
        : KParts::Plugin(parent, name)
 
49
{
 
50
        setInstance(ToolCropFactory::instance());
 
51
 
 
52
        kdDebug() << "Crop tool plugin. Class: "
 
53
                << className()
 
54
                << ", Parent: "
 
55
                << parent -> className()
 
56
                << "\n";
 
57
 
 
58
        if ( parent->inherits("KisView") )
 
59
        {
 
60
                KisView * view = dynamic_cast<KisView *>(parent);
 
61
 
 
62
                KisToolRegistry * r = view -> toolRegistry();
 
63
 
 
64
                r -> add(new KisToolCropFactory(actionCollection()));
 
65
        }
 
66
 
 
67
}
 
68
 
 
69
ToolCrop::~ToolCrop()
 
70
{
 
71
}
 
72
 
 
73
#include "tool_crop.moc"