Skip to content

Commit bba01f4

Browse files
matborzyszkowskisys_zuul
authored andcommitted
Replace memcpy on memcpy_s
Change-Id: I6bad596af3e5f59c31be1c61c1c8948dc2c5ddf3
1 parent d65d5cb commit bba01f4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

IGC/AdaptorOCL/cif/cif/builtins/memory/buffer/buffer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3131
#include "cif/common/id.h"
3232
#include "cif/common/cif.h"
3333
#include "cif/common/cif_main.h"
34-
#include "cif/helpers/memory.h"
3534

3635
#include "cif/macros/enable.h"
3736

IGC/AdaptorOCL/cif/cif/builtins/memory/buffer/impl/buffer_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3232

3333
#include "cif/macros/enable.h"
3434

35+
#include "cif/helpers/memory.h"
36+
3537
namespace CIF {
3638

3739
namespace Builtins {

IGC/AdaptorOCL/cif/cif/common/coder.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3232
#include <string>
3333

3434
#include "cif/helpers/error.h"
35-
#include "cif/helpers/memory.h"
3635

3736
namespace CIF {
3837

IGC/AdaptorOCL/cif/cif/helpers/memory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2626

2727
#pragma once
2828

29-
#include <string.h>
29+
#include "common/secure_mem.h"
3030
#include "cif/helpers/error.h"
3131

3232
namespace CIF{
@@ -48,7 +48,7 @@ inline void SafeCopy(void *dst, size_t dstAvailableSizeInBytes, const void *src,
4848
const char * srcAsChar = reinterpret_cast<const char*>(src);
4949

5050
// TODO : Verify that compiler actually picks this pattern-up as memcpy and optimizes it
51-
memcpy(dstAsChar, srcAsChar, bytesToCopy);
51+
memcpy_s(dstAsChar, bytesToCopy, srcAsChar, bytesToCopy);
5252
}
5353

5454
template<typename T>

0 commit comments

Comments
 (0)