[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Crash when reading negative size of data from QUdpSocket
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2008-06-27 14:01:42
Message-ID: cd26f5b515b621133353672c67751a79 () localhost
[Download RAW message or body]

On Tue, 24 Jun 2008 19:16:47 +0300, "İsmail Dönmez" <ismail@namtrac.org>
wrote:
> Hi,
> 
> Using latest sip/PyQt snapshots with Qt4.4, see following:
> 
>>>> from PyQt4.QtNetwork import QHostAddress, QUdpSocket
>>>> socket = QUdpSocket()
>>>> success = socket.bind(QHostAddress("0.0.0.0"), 5555)
>>>> success
> True
>>>> socket.readData(-1)
> terminate called after throwing an instance of 'std::bad_alloc'
>   what():  std::bad_alloc
> 
> Simply returning None when a negative size is given is a better idea.

Tonight's snapshot will raise a ValueError exception in this situation.

Phil

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic