- fixed some potential bugs with strlcpy

This commit is contained in:
zolliker
2010-04-15 11:24:27 +00:00
parent ffa378b60d
commit 4a5691503d
3 changed files with 4 additions and 4 deletions

View File

@@ -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;
}