Skip to content

Commit

Permalink
Mark ReadValue as safebuffers to avoid security cookie overhead.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpd002 committed Jul 17, 2024
1 parent 5ed55dc commit 881acde
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/ee/Vif.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
#include <emmintrin.h>
#endif

#ifdef _MSC_VER
#define FRAMEWORK_SAFE_BUFFERS __declspec(safebuffers)
#else
#define FRAMEWORK_SAFE_BUFFERS
#endif

class CINTC;

class CVif
Expand Down Expand Up @@ -161,7 +167,7 @@ class CVif
}

template <size_t ValueSize>
inline void ReadValue(void* buffer)
inline FRAMEWORK_SAFE_BUFFERS void ReadValue(void* buffer)
{
//Hyper-specialized version of Read that allows the compiler to better
//optimize the code. Will only work with reads of at most 16 bytes.
Expand Down

0 comments on commit 881acde

Please sign in to comment.