-
Bug
-
Resolution: Done
-
P1: Critical
-
4.6.3, 4.7.0
-
None
-
Debian Linux 2.6.32-5-686 #1 SMP Sat Sep 18 02:14:45 UTC 2010 i686 GNU/Linux
Currently using Qt 4.7.0.
Windows 7,
Qt 4.7.0.
-
e3f1268e63064a54215051cf91d5f6b8c8bd4f0f, bfd87980bdc3d835723f429a3e4dbe2d884bca27
According to the documentation, a call of
qint64 QIODevice::read ( char * data, qint64 maxSize )
should write no more than maxSize byte to *data.
However, when the QIODevice is created with
QIODevice* stream = audioInput.start();
the call
qint64 bytesRead = stream->read(buffer, 400);
writes more than 400 byte to buffer (and the number > 400 is returned) if the time is long enough that the audio device has more than 400 byte to transfer. This behavior crashes programs that reserve 400 byte for the buffer.
When debugging we realized that
stream->read(buffer, 400);
finally calles
qint64 QAudioInputPrivate::read(char* data, qint64 len)
in qaudioinput_alsa_p.cpp with len == 400.
But in this function, len is not used Q_UNUSED(len) and all available bytes are read.
- relates to
-
QTBUG-8578 QAudioInputPrivate crash in Windows
-
- Closed
-