diff --git a/CASA-auth-token/client/library/engine.c b/CASA-auth-token/client/library/engine.c index 64900550..36e08ef8 100644 --- a/CASA-auth-token/client/library/engine.c +++ b/CASA-auth-token/client/library/engine.c @@ -1054,6 +1054,11 @@ SetATSHostList( for (i = 0; ATSHostList[i] != NULL; i++) { int ret; + if (strlen(ATSHostList[i]) > 255) { + DbgTrace(0, "-SetATSHostList- Host name too long: %s\n", ATSHostList[i]); + retStatus = CASA_STATUS_INVALID_PARAMETER; + goto exit; + } ret = sscanf(ATSHostList[i], "%[^:]:%hu", address, &port); if (ret != 2) { DbgTrace(0, "-SetATSHostList- Invalid entry: %s\n", ATSHostList[i]);