Skip to content

Commit c4024b6

Browse files
committed
XMEMMOVE
1 parent 868758a commit c4024b6

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

helper.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ sub check_source {
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*\(/;
5353
push @{$troubles->{unwanted_memcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bmemcmp\s*\(/;
54+
push @{$troubles->{unwanted_memmove}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bmemmove\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*\(/;
5657
push @{$troubles->{unwanted_qsort}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bqsort\s*\(/;

src/headers/tomcrypt_custom.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#ifndef XMEMCMP
2525
#define XMEMCMP memcmp
2626
#endif
27+
#ifndef XMEMMOVE
28+
#define XMEMMOVE memmove
29+
#endif
2730
#ifndef XMEM_NEQ
2831
#define XMEM_NEQ mem_neq
2932
#endif

src/pk/asn1/der/sequence/der_encode_sequence_ex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ int der_encode_sequence_ex(ltc_asn1_list *list, unsigned long inlen,
225225
tmptag[4] = (unsigned char)(z&255);
226226
y = 5;
227227
}
228-
memmove(out + x + y, out + x, z);
228+
XMEMMOVE(out + x + y, out + x, z);
229229
XMEMCPY(out + x, tmptag, y);
230230

231231
z += y;

0 commit comments

Comments
 (0)