OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12198d2
)
use qt_safe_read() instead of calling the virtual QFile::readData() in QFile::readLin...
author
Ivailo Monev
<xakepa10@gmail.com>
Tue, 1 Nov 2022 17:24:50 +0000
(19:24 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Tue, 1 Nov 2022 17:24:50 +0000
(19:24 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/io/qfile.cpp
patch
|
blob
|
history
diff --git
a/src/core/io/qfile.cpp
b/src/core/io/qfile.cpp
index
a281ab2
..
09e71c8
100644
(file)
--- a/
src/core/io/qfile.cpp
+++ b/
src/core/io/qfile.cpp
@@
-1267,7
+1267,7
@@
qint64 QFile::readLineData(char *data, qint64 maxlen)
qint64 readSoFar = 0;
while (readSoFar < maxlen) {
char c;
- qint64 readResult =
readData(
&c, 1);
+ qint64 readResult =
qt_safe_read(d->fd,
&c, 1);
if (readResult <= 0)
return (readSoFar > 0) ? readSoFar : -1;
++readSoFar;