Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/agetpass.*: erase_pass(): Specify array parameter size
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Colomar <[email protected]>
alejandro-colomar committed Jan 20, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 3f662bc commit 30b50b1
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/agetpass.c
Original file line number Diff line number Diff line change
@@ -7,6 +7,6 @@
#include "agetpass.h"


extern inline void erase_pass(char *pass);
extern inline void erase_pass(char pass[PASS_MAX + 2]);
extern inline char *getpass_(char pass[PASS_MAX + 2], const char *prompt,
int flags);
4 changes: 2 additions & 2 deletions lib/agetpass.h
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
#define agetpass_(...) getpass_(alloca(PASS_MAX + 2), __VA_ARGS__)


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

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


inline void
erase_pass(char *pass)
erase_pass(char pass[PASS_MAX + 2])
{
memzero(pass, PASS_MAX + 2);
}

0 comments on commit 30b50b1

Please sign in to comment.