9aaf12ebaa
Nothing here is empty and even if anything were, QStringBuilder properly handles empty strings. In static member function ‘static void QConcatenable<QByteArrayView>::appendTo(QByteArrayView, char*&)’, inlined from ‘static void QConcatenable<QStringBuilder< <template-parameter-1-1>, <template-parameter-1-2> > >::appendTo(const type&, T*&) [with T = char; A = QByteArrayView; B = const char (&)[20]]’ at qstringbuilder.h:398:37, inlined from ‘T QStringBuilder< <template-parameter-1-1>, <template-parameter-1-2> >::convertTo() const [with T = QByteArray; A = QByteArrayView; B = const char (&)[20]]’ at qstringbuilder.h:117:54, ... qstringbuilder.h:178:19: error: ‘void* memcpy(void*, const void*, size_t)’ forming offset [1, 5] is out of the bounds [0, 1] of object ‘QByteArray::_empty’ with type ‘const char’ [-Werror=array-bounds=] QStringBuilder::convertTo() creates the target as const qsizetype len = QConcatenable< QStringBuilder<A, B> >::size(*this); T s(len, Qt::Uninitialized); We know len can't be zero because GCC is complaining about a memcpy() when the offset has been changed from 0, meaning QByteArray was given a non-zero size and therefore its data pointer is not &QByteArray::_empty. Fixes: QTBUG-116763 Pick-to: 6.5 6.6 Change-Id: I85599ea5ca7a4b79a8bbfffd178af437984080fb Reviewed-by: Shawn Rutledge (away) <shawn.rutledge@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake |