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:
e632833
)
better array management via QSTACKARRAY() macro
author
Ivailo Monev
<xakepa10@gmail.com>
Wed, 15 Jun 2022 07:10:48 +0000
(07:10 +0000)
committer
Ivailo Monev
<xakepa10@gmail.com>
Wed, 15 Jun 2022 07:19:34 +0000
(07:19 +0000)
I should probably make it public and start using it in Katana to
eliminate a lot of uninitialized memory access bugs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qbytearray.cpp
patch
|
blob
|
history
diff --git
a/src/core/tools/qbytearray.cpp
b/src/core/tools/qbytearray.cpp
index
4fef488
..
7a269ba
100644
(file)
--- a/
src/core/tools/qbytearray.cpp
+++ b/
src/core/tools/qbytearray.cpp
@@
-1840,7
+1840,7
@@
QByteArray &QByteArray::replace(const char *before, int bsize, const char *after
// the most complex case. We don't want to lose performance by doing repeated
// copies and reallocs of the string.
while (index != -1) {
-
uint indices[4096]
;
+
QSTACKARRAY(uint, indices, 4096)
;
uint pos = 0;
while(pos < 4095) {
index = matcher.indexIn(*this, index);