mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
fix possible crash in case null pointer is passed to QCryptographicHash::addData()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f1bbf0c42e
commit
c228fd6100
1 changed files with 2 additions and 4 deletions
|
@ -165,11 +165,9 @@ void QCryptographicHash::addData(const char *data, int length)
|
|||
*/
|
||||
bool QCryptographicHash::addData(QIODevice* device)
|
||||
{
|
||||
if (!device->isReadable())
|
||||
return false;
|
||||
|
||||
if (!device->isOpen())
|
||||
if (!device || !device->isReadable() || !device->isOpen()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
QSTACKARRAY(char, buffer, QT_BUFFSIZE);
|
||||
int length;
|
||||
|
|
Loading…
Add table
Reference in a new issue