aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-06-06 14:13:29 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-06-06 12:28:54 +0000
commit14c64a5b53b23d3caf7d8f603cac6ebc05f4186f (patch)
tree1c60326671b6a1da7ee12e22c4283289c4501a0c /dist
parent3f5550aada22cefe2f5ec22b2a43b24ef07543fd (diff)
Tooling: Fix integer range checks
The packet protocol should check if the number of bytes to be read is positive. Also, a Q_ASSERT on the return value of read() is too brutal. The device can have failed for any number of reasons and we don't want to crash the application because of that. Finally, the number of bytes to be read includes the bytes read to determine the number. Make that clearer by subtracting the actual count, not sizeof(qint32). The check in QQmlProfilerTypedEvent is supposed to happen before we cast the number to the more restrictive type. Furthermore, if subtype doesn't fit the range constraint, we don't have to do anything at all as the default rangeType is already set before. Change-Id: I48c8c47e4207abae6e718eea97815d43e7f9d833 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'dist')
0 files changed, 0 insertions, 0 deletions