Skip to content

Commit 11338d2

Browse files
committed
introduce XMEMMOVE and check for its usage
1 parent e9c90e7 commit 11338d2

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

helper.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ sub check_source {
5050
push @{$troubles->{unwanted_free}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bfree\s*\(/;
5151
push @{$troubles->{unwanted_memset}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bmemset\s*\(/;
5252
push @{$troubles->{unwanted_memcpy}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bmemcpy\s*\(/;
53+
push @{$troubles->{unwanted_memmove}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bmemmove\s*\(/;
5354
push @{$troubles->{unwanted_memcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bmemcmp\s*\(/;
5455
push @{$troubles->{unwanted_strcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bstrcmp\s*\(/;
5556
push @{$troubles->{unwanted_clock}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bclock\s*\(/;

src/headers/tomcrypt_custom.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#ifndef XMEMCPY
3131
#define XMEMCPY memcpy
3232
#endif
33+
#ifndef XMEMMOVE
34+
#define XMEMMOVE memmove
35+
#endif
3336
#ifndef XMEMCMP
3437
#define XMEMCMP memcmp
3538
#endif

0 commit comments

Comments
 (0)