path: root/src/plugins/platforms/cocoa/
diff options
authorRafael Roquetto <>2013-12-16 16:10:22 -0200
committerThe Qt Project <>2013-12-17 19:05:50 +0100
commitce9ece3b56d45b00bbca14042fe4d60df35de191 (patch)
treebbe33d811d69c776bd63dabe8d3eb47e93118044 /src/plugins/platforms/cocoa/
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(... ...) 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 <> Reviewed-by: Giuseppe D'Angelo <>
Diffstat (limited to 'src/plugins/platforms/cocoa/')
0 files changed, 0 insertions, 0 deletions