Avoid heap-buffer-overflow
[ChangeLog][QCosmeticStroker] Avoid a heap-buffer-overflow found by oss- fuzz as issue 25243. Pick-to: 5.12 5.15 Change-Id: I36112f183241679e172ad1ee531e1b929d6f3815 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
316bf12443
commit
1d778a59f7
@ -101,7 +101,7 @@ struct Dasher {
|
||||
offset += stroker->patternLength;
|
||||
|
||||
dashIndex = 0;
|
||||
while (offset>= pattern[dashIndex])
|
||||
while (dashIndex < stroker->patternSize - 1 && offset>= pattern[dashIndex])
|
||||
++dashIndex;
|
||||
|
||||
// qDebug() << " dasher" << offset/64. << reverse << dashIndex;
|
||||
|
Loading…
Reference in New Issue
Block a user