Commit 27425e62 authored by Olivier Goffart's avatar Olivier Goffart Committed by Olivier Goffart (Woboq GmbH)
Browse files

Moc: fix crash when a file ends with \\\r


make the 'cleaned' more robust by making sure we do not read past the
buffer in some cases. We must also use resize and not reserve on the
outpt buffer because reseve is meant as a hint and we are not supposed
to write past the size of the QByteArray even if it is reserved.

[ChangeLog][moc] Fixed crash on file ending with \\\r

Task-number: QTBUG-53441
Change-Id: I901e6c0ffc7f8877de3d07fd08cf26495461d294
Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: default avatarRobert Loehning <robert.loehning@qt.io>
parent 4251509c
Branches
Tags
Showing with 6 additions and 2 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment