From 70141ae972397097ce469c6d9fca000a8b866034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 13 May 2019 17:11:12 +0200 Subject: [PATCH] fixing up pam_http --- ssh-tunnel/pam-http/src/http.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ssh-tunnel/pam-http/src/http.c b/ssh-tunnel/pam-http/src/http.c index ef09a3f4..dc5e28dd 100644 --- a/ssh-tunnel/pam-http/src/http.c +++ b/ssh-tunnel/pam-http/src/http.c @@ -65,9 +65,10 @@ static int getUrl(const char* url, char* buffer, size_t size ) { int isValid(const char* str) { - const int len = strnlen(str, 256); - for( int i = 0; i < len; i++ ) { - if ( !isalnum(str[i] && str[i] != '-') ) { + const int len = strnlen(str, DATASIZE); + int i; + for( i = 0; i < len; i++ ) { + if ( !isalnum(str[i]) && str[i] != '-' ) { return 0; } }