trilliumeng / orion-sdk

Public SDK and ICD for Trillium Engineering's Orion Gimbals.
http://www.trilliumeng.com
MIT License
18 stars 15 forks source link

Stream decoder computes wrong frame buffer size #14

Closed sezekiel-insitu closed 7 months ago

sezekiel-insitu commented 2 years ago

Line 327 of the file StreamDecoder.c verifies that the buffer to hold a video frame is large enough. It reads:

if ((pFrameCopy->width > 0) && (pFrameCopy->height > 0) && ((pFrame->width * pFrame->height * 3) < MaxBytes))

I believe it should read:

if ((pFrameCopy->width > 0) && (pFrameCopy->height > 0) && ((pFrameCopy->width * pFrameCopy->height * 3) <= MaxBytes))
trilliumbuild commented 7 months ago

Thank you for your help pinning this issue down the fix has been incorporated into the 24.1 release.