aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_debug
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2023-12-14 19:50:12 +0100
committerDmitry V. Levin <ldv@strace.io>2023-12-14 20:04:32 +0000
commit9f733e5f3b8ae092e405d8bffa523a22155a7f6a (patch)
tree286eddb01419ff259636382239d69ff5e4a4c0e8 /modules/pam_debug
parent954234f0a477636eab751a6601d34bab1db41b0e (diff)
downloadpam-9f733e5f3b8ae092e405d8bffa523a22155a7f6a.tar.gz
pam-9f733e5f3b8ae092e405d8bffa523a22155a7f6a.tar.bz2
pam-9f733e5f3b8ae092e405d8bffa523a22155a7f6a.zip
treewide: store strlen results in size_t
Very long strings could overflow the int data type. Make sure to use the correct data type. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'modules/pam_debug')
-rw-r--r--modules/pam_debug/pam_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_debug/pam_debug.c b/modules/pam_debug/pam_debug.c
index 414806b2..37bf8b95 100644
--- a/modules/pam_debug/pam_debug.c
+++ b/modules/pam_debug/pam_debug.c
@@ -40,7 +40,7 @@ static int parse_args(int retval, const char *event,
int i;
for (i=0; i<argc; ++i) {
- int length = strlen(event);
+ size_t length = strlen(event);
if (!strncmp(event, argv[i], length) && (argv[i][length] == '=')) {
int j;
const char *return_string = argv[i] + (length+1);