Skip to content

Commit 4545946

Browse files
lib/agetpass.*: erase_pass(): Specify array parameter size
Signed-off-by: Alejandro Colomar <[email protected]>
1 parent b7c072b commit 4545946

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/agetpass.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
#include "agetpass.h"
88

99

10-
extern inline void erase_pass(char *pass);
10+
extern inline void erase_pass(char pass[PASS_MAX + 2]);
1111
extern inline char *getpass_(char pass[PASS_MAX + 2], const char *prompt,
1212
int flags);

lib/agetpass.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#define agetpass_(...) getpass_(alloca(PASS_MAX + 2), __VA_ARGS__)
4040

4141

42-
inline void erase_pass(char *pass);
42+
inline void erase_pass(char pass[PASS_MAX + 2]);
4343
ATTR_MALLOC(erase_pass)
4444
inline char *getpass_(char pass[PASS_MAX + 2], const char *prompt, int flags);
4545

@@ -75,7 +75,7 @@ getpass_(char pass[PASS_MAX + 2], const char *prompt, int flags)
7575

7676

7777
inline void
78-
erase_pass(char *pass)
78+
erase_pass(char pass[PASS_MAX + 2])
7979
{
8080
memzero(pass, PASS_MAX + 2);
8181
}

0 commit comments

Comments
 (0)