[Uml-devel] KDE/kdesdk/umbrello/umbrello
Albert Astals Cid
tsdgeos at terra.es
Sun Jun 22 18:42:35 UTC 2008
A Diumenge 22 Juny 2008, Sharan Rao va escriure:
> On Sunday 22 Jun 2008 11:14:56 pm Albert Astals Cid wrote:
> > SVN commit 823169 by aacid:
> >
> > You can't do
> > const char* f = format.toAscii().constData();
> > and then use f.
> >
> > If you do, you are using the address of a temporary and it will crash
> > your program
> >
> > CCMAIL: sharanrao at gmail.com
> >
> >
> >
> > M +2 -1 uml.cpp
> >
> >
> > --- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #823168:823169
> > @@ -1271,7 +1271,8 @@
> > {
> > QStringList supportedFormats = mimeData->formats();
> > foreach( const QString &format, supportedFormats ) {
> > - const char* f = format.toAscii().constData();
> > + QByteArray fba = format.toAscii();
> > + const char* f = fba.constData();
> > if ( !qstrnicmp(f,"application/x-uml-clip", 22) ) {
> > //FIXME need to test for clip1, clip2, clip3, clip4 or clip5
> > //(the only valid clip types)
>
> Hmm, thanks for pointing that out :). Missed it comletely :(
No problem, nobody is perfect :-)
Albert
>
> Cheers!
> Sharan Rao
More information about the umbrello-devel
mailing list