From 1718efe8fab245ef2a5a3dd11dc038cdcd0957bc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 14 Aug 2017 14:02:56 +0200 Subject: QByteArray::setRawData(): don't null-terminate initialization from nullptr it's antithetical to do that, as raw data is documented to be not null- terminated. QString doesn't, either. Change-Id: I7ded83a09f64e747a248f9bdac2a364032aae4c0 Reviewed-by: Thiago Macieira --- src/corelib/tools/qbytearray.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/corelib/tools/qbytearray.cpp') diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index adfa939cc6..421e716d14 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -4337,7 +4337,6 @@ QByteArray &QByteArray::setRawData(const char *data, uint size) } else { d->offset = sizeof(QByteArrayData); d->size = 0; - *d->data() = 0; } } return *this; -- cgit v1.2.3