awslabs / amazon-kinesis-video-streams-pic

Apache License 2.0
49 stars 47 forks source link

Fix 32 bit crash issue #230

Closed hassanctech closed 9 months ago

hassanctech commented 9 months ago

Issue #, if available:

Description of changes: In threadpoolFree there is a call made to stackQueueIteratorGetItem which pass the address of a pointer, but the API expected and returns a UINT64 in this field, this will cause a crash on 32 bit platforms. For reference similar issue's have been fixed and proper usage can be found elsewhere in PIC: https://github.com/awslabs/amazon-kinesis-video-streams-pic/blob/57637ea593f4b43c509413a44d993ed08d7f2616/src/client/src/Stream.c#L2059-L2062

I've modified this to follow the same pattern. The CHK for NULL was missing as well if it's null we will seg fault when we try to access item->dataMutex.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (e1b4f92) 75.12% compared to head (bab88f5) 75.13%.

:exclamation: Current head bab88f5 differs from pull request most recent head 5f502b7. Consider uploading reports for the commit 5f502b7 to get more accurate results

Files Patch % Lines
src/utils/src/Threadpool.c 70.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #230 +/- ## ======================================== Coverage 75.12% 75.13% ======================================== Files 52 52 Lines 10225 10231 +6 ======================================== + Hits 7682 7687 +5 - Misses 2543 2544 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.