- fixed some potential bugs with strlcpy
This commit is contained in:
@@ -108,12 +108,12 @@ static int sinqHttpCheckResponse(pSinqHttp self)
|
||||
}
|
||||
if (strstr(pPtr, "ERROR") != NULL) {
|
||||
memset(self->hmError, 0, 512 * sizeof(char));
|
||||
strlcpy(self->hmError, pPtr, len);
|
||||
strlcpy(self->hmError, pPtr, sizeof(self->hmError));
|
||||
self->errorCode = HTTPERROR;
|
||||
return 0;
|
||||
} else if (strstr(pPtr, "Authentication Error") != NULL) {
|
||||
memset(self->hmError, 0, 512 * sizeof(char));
|
||||
strlcpy(self->hmError, pPtr, len);
|
||||
strlcpy(self->hmError, pPtr, sizeof(self->hmError));
|
||||
self->errorCode = BADAUTH;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user