check for int overflow
This commit is contained in:
parent
f14da64cde
commit
971df79a2d
1 changed files with 6 additions and 0 deletions
|
@ -1623,6 +1623,9 @@ proc fillShapes(
|
|||
if pathWidth == 0:
|
||||
return
|
||||
|
||||
if pathWidth < 0:
|
||||
raise newException(PixieError, "Path int overflow detected")
|
||||
|
||||
var
|
||||
coverages = newSeq[uint8](pathWidth)
|
||||
hits = newSeq[(float32, int16)](partitioning.maxEntryCount)
|
||||
|
@ -1689,6 +1692,9 @@ proc fillShapes(
|
|||
if pathWidth == 0:
|
||||
return
|
||||
|
||||
if pathWidth < 0:
|
||||
raise newException(PixieError, "Path int overflow detected")
|
||||
|
||||
var
|
||||
coverages = newSeq[uint8](pathWidth)
|
||||
hits = newSeq[(float32, int16)](partitioning.maxEntryCount)
|
||||
|
|
Loading…
Reference in a new issue