Skip to content

Commit a68b703

Browse files
committed
use zeromem in stream-cipher done() functions
1 parent ef55d13 commit a68b703

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/stream/chacha/chacha_done.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
int chacha_done(chacha_state *st)
2020
{
2121
LTC_ARGCHK(st != NULL);
22-
XMEMSET(st, 0, sizeof(chacha_state));
22+
zeromem(st, sizeof(chacha_state));
2323
return CRYPT_OK;
2424
}
2525

src/stream/rc4/rc4_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ int rc4_stream_keystream(rc4_state *st, unsigned char *out, unsigned long outlen
100100
int rc4_stream_done(rc4_state *st)
101101
{
102102
LTC_ARGCHK(st != NULL);
103-
XMEMSET(st, 0, sizeof(rc4_state));
103+
zeromem(st, sizeof(rc4_state));
104104
return CRYPT_OK;
105105
}
106106

src/stream/salsa20/salsa20_done.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
int salsa20_done(salsa20_state *st)
2020
{
2121
LTC_ARGCHK(st != NULL);
22-
XMEMSET(st, 0, sizeof(salsa20_state));
22+
zeromem(st, sizeof(salsa20_state));
2323
return CRYPT_OK;
2424
}
2525

src/stream/sober128/sober128_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ int sober128_stream_keystream(sober128_state *st, unsigned char *out, unsigned l
332332
int sober128_stream_done(sober128_state *st)
333333
{
334334
LTC_ARGCHK(st != NULL);
335-
XMEMSET(st, 0, sizeof(sober128_state));
335+
zeromem(st, sizeof(sober128_state));
336336
return CRYPT_OK;
337337
}
338338

src/stream/sosemanuk/sosemanuk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ int sosemanuk_keystream(sosemanuk_state *st, unsigned char *out, unsigned long o
805805
int sosemanuk_done(sosemanuk_state *st)
806806
{
807807
LTC_ARGCHK(st != NULL);
808-
XMEMSET(st, 0, sizeof(sosemanuk_state));
808+
zeromem(st, sizeof(sosemanuk_state));
809809
return CRYPT_OK;
810810
}
811811

0 commit comments

Comments
 (0)