Skip to content

Commit 153b897

Browse files
karel-msjaeckel
authored andcommitted
helper.pl - detect sizeof without brackets
(cherry picked from commit b7e35e9)
1 parent f10c205 commit 153b897

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

helper.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ sub check_source {
5555
push @{$troubles->{unwanted_strcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bstrcmp\s*\(/;
5656
push @{$troubles->{unwanted_clock}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bclock\s*\(/;
5757
push @{$troubles->{unwanted_qsort}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bqsort\s*\(/;
58+
push @{$troubles->{sizeof_no_brackets}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bsizeof\s*[^\(]/;
5859
if ($file =~ m|src/.*\.c$| &&
5960
$file !~ m|src/ciphers/.*\.c$| &&
6061
$file !~ m|src/hashes/.*\.c$| &&

src/ciphers/des.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ static void cookey(const ulong32 *raw1, ulong32 *keyout)
13831383
*cook++ |= (*raw1 & 0x0000003fL);
13841384
}
13851385

1386-
XMEMCPY(keyout, dough, sizeof dough);
1386+
XMEMCPY(keyout, dough, sizeof(dough));
13871387
}
13881388

13891389
#ifdef LTC_CLEAN_STACK

0 commit comments

Comments
 (0)