This repository has been archived on 2026-09-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
alradmsft acf202a381 Fix stack corruption due to calling convention mismatch
Standard library implementations may specify calling convention for memcpy
explicitly. However, the cbor* APIs don't do that. If you compile the lib
with default calling convention that doesn't match the calling convention o
memcpy(), the iterate_string_chunks() will not setup the stack for memcpy()
call correctly resulting in a stack corruption. The compiler doesn't catch
this issue because of the cast that is being applied when passing memcpy()
to the iterate_string_chunks().

The fix is to wrap memcpy() in a function that conforms to the declaration o
the IterateFunction which does two things, removes the need for a cast and
uncouples memcpy() calling convention from the rest of the cbor* APIs.

Signed-off-by: Alex Radutskiy (alex.radutskiy@microsoft.com)
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-06 08:12:35 +01:00
2017-01-18 15:47:32 -08:00
2016-10-07 15:13:31 +02:00
2016-07-07 20:40:13 -07:00
2016-01-04 10:02:27 -02:00
2017-01-18 15:47:32 -08:00
2017-01-18 15:47:32 -08:00
S
Description
[ARCHIVE] GOLEM lab historic — frozen 2026-09-06
MIT
891 KiB
Languages
C 50.3%
C++ 45.9%
CMake 2.1%
Perl 1.3%
Shell 0.3%
Other 0.1%