summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2013-12-16 16:10:22 -0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-17 19:05:50 +0100
commitce9ece3b56d45b00bbca14042fe4d60df35de191 (patch)
treebbe33d811d69c776bd63dabe8d3eb47e93118044 /src/plugins/platforms
parente7d39c929204f631d11e2f87b2f8e972b1abbf6e (diff)
Fix qlocale_blackberry buffer initialization
The QVarLengthArray inside qlocale_blackberry.cpp was being preallocated with 512 bytes, that means internally it could grow up to 512 bytes using the stack before switching to the heap, but its actual semantic size was still 0. After qt_safe_read(... buffer.data() ...) was being called, data was written to the QVarLengthArray buffer, but its semantic size was still 0, since it was not resized or anything. This triggered an assertion when buffer[bytes] = '\0' was assigned, since 'bytes' > buffer.size() ( == 0) despite buffer.capacity() == 512. Change-Id: I5503ee9b02413794f67730700fba05a4c194d465 Reviewed-by: Mehdi Fekari <mfekari@blackberry.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/plugins/platforms')
0 files changed, 0 insertions, 0 deletions