Correct the size of downsampledFrame

The frameWidth and frameHeight should be both considered when determining the size of downsampledFrame.
The previous code used frameWidth, potentially causing an illegal memory access.
This commit is contained in:
Kyuwon Kim 2019-06-23 19:41:50 +09:00 committed by GitHub
parent 1740bb66bd
commit 1e383fbac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,7 +244,7 @@ public class ObjectTracker {
new byte
[(frameWidth + DOWNSAMPLE_FACTOR - 1)
/ DOWNSAMPLE_FACTOR
* (frameWidth + DOWNSAMPLE_FACTOR - 1)
* (frameHeight + DOWNSAMPLE_FACTOR - 1)
/ DOWNSAMPLE_FACTOR];
}