getsentry / sentry-native

Sentry SDK for C, C++ and native applications.
MIT License
404 stars 170 forks source link

fix: adjusted memcpy size param to match remaining destination size #1047

Closed JoshuaMoelans closed 1 month ago

JoshuaMoelans commented 1 month ago

As part of an investigation into unsafe functions (https://github.com/getsentry/sentry-native/issues/1012) a slight mismatch between buffer size and copy amount was found for a call to memcpy.

This PR fixes this by making the copied amount match the to-copy parameter's size.

skip-changelog

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.76%. Comparing base (f0d2a66) to head (ab6ab1d). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1047 +/- ## ========================================== - Coverage 81.78% 81.76% -0.02% ========================================== Files 53 53 Lines 6363 6363 Branches 1207 1207 ========================================== - Hits 5204 5203 -1 - Misses 1046 1047 +1 Partials 113 113 ```