to make static analysers happy. PR 60634.
Reported by shqking and Zhenwei Zou.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1781509 13f79535-47bb-0310-9956-
ffa450edef68
{
char hash_str[MAX_STRING_LEN];
int ret;
+
ctx->out = hash_str;
ctx->out_len = sizeof(hash_str);
ret = mkhash(ctx);
- if (ret)
+ if (ret) {
+ ctx->out = NULL;
+ ctx->out_len = 0;
return ret;
+ }
ctx->out = apr_pstrcat(ctx->pool, user, ":", hash_str, NL, NULL);
- if (strlen(ctx->out) >= MAX_STRING_LEN) {
+ ctx->out_len = strlen(ctx->out);
+ if (ctx->out_len >= MAX_STRING_LEN) {
ctx->errstr = "resultant record too long";
return ERR_OVERFLOW;
}