[pim/kdepim-addons] plugins/webengineurlinterceptor/adblock: We need to resize buffer not reserve

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit fef447ad7151b8e6aec14482681bf3e4cebdcfba by Laurent Montel.
Committed on 15/08/2026 at 10:26.
Pushed by mlaurent into branch 'master'.

We need to resize buffer not reserve

M  +1    -1    plugins/webengineurlinterceptor/adblock/adblockmanager.cpp

https://invent.kde.org/pim/kdepim-addons/-/commit/fef447ad7151b8e6aec14482681bf3e4cebdcfba

diff --git a/plugins/webengineurlinterceptor/adblock/adblockmanager.cpp b/plugins/webengineurlinterceptor/adblock/adblockmanager.cpp
index 5318203e8..73d1b826b 100644
--- a/plugins/webengineurlinterceptor/adblock/adblockmanager.cpp
+++ b/plugins/webengineurlinterceptor/adblock/adblockmanager.cpp
@@ -77,7 +77,7 @@ void copyStream(QIODevice &input, QIODevice &output)
     constexpr auto BUFFER_SIZE = 1024;
 
     QByteArray buffer;
-    buffer.reserve(BUFFER_SIZE);
+    buffer.resize(BUFFER_SIZE);
 
     while (true) {
         int64_t read = input.read(buffer.data(), BUFFER_SIZE);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.