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

« back to all changes in this revision

Viewing changes to kugar/part/kugar_part.cpp

  • 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:
48
48
//      closeURL();
49
49
}
50
50
 
 
51
bool KugarPart::loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* )
 
52
{
 
53
        return false;
 
54
}
 
55
 
 
56
bool KugarPart::saveOasis(KoStore*, KoXmlWriter*)
 
57
{
 
58
        return false;
 
59
}
 
60
 
51
61
bool KugarPart::loadXML( QIODevice *file, const QDomDocument & doc)
52
62
{
53
63
        m_docURL=url();
102
112
                KMessageBox::sorry(0,i18n("Unable to open data file: %1").arg(m_file));
103
113
        }
104
114
 
105
 
        return ok;      
 
115
        return ok;
106
116
}
107
117
 
108
 
bool KugarPart::initDoc()
 
118
bool KugarPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
109
119
{
110
120
        QString filename;
111
121
        bool ok=false;
180
190
                    if (KIO::NetAccess::download(tmpURL,localtpl))
181
191
                        isTemp=true;
182
192
                    else
183
 
                    KMessageBox::sorry(0,i18n("Unable to download template file: %1").arg(url.prettyURL()));                    
 
193
                    KMessageBox::sorry(0,i18n("Unable to download template file: %1").arg(url.prettyURL()));
184
194
                    }
185
195
            }
186
196
        }
223
233
                                else
224
234
                                {
225
235
                                        KoStore *tmpStore=KoStore::createStore(localtpl,KoStore::Read);
226
 
                                        if (tmpStore->open("maindoc.xml")) 
 
236
                                        if (tmpStore->open("maindoc.xml"))
227
237
                                        {
228
238
                                                if (!m_reportEngine -> setReportTemplate(tmpStore->device()))
229
239
                                                        KMessageBox::sorry(0,i18n("%1 is not a valid Kugar Designer template file.").arg(localtpl));
232
242
                                                tmpStore->close();
233
243
                                        }
234
244
                                        else
235
 
                                                KMessageBox::sorry(0,i18n("%1 is not a valid Kugar Designer template file.").arg(localtpl));    
236
 
                                        
 
245
                                                KMessageBox::sorry(0,i18n("%1 is not a valid Kugar Designer template file.").arg(localtpl));
 
246
 
237
247
                                        delete tmpStore;
238
248
                                }
239
249