fixing up pam_http

This commit is contained in:
Adolfo Gómez García 2019-05-13 17:11:12 +02:00
parent 20ead2954b
commit 70141ae972

View File

@ -65,9 +65,10 @@ static int getUrl(const char* url, char* buffer, size_t size ) {
int isValid(const char* str) int isValid(const char* str)
{ {
const int len = strnlen(str, 256); const int len = strnlen(str, DATASIZE);
for( int i = 0; i < len; i++ ) { int i;
if ( !isalnum(str[i] && str[i] != '-') ) { for( i = 0; i < len; i++ ) {
if ( !isalnum(str[i]) && str[i] != '-' ) {
return 0; return 0;
} }
} }