/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
}
static const char *
-munge_other_line(const char *buf, cachemgr_request * req)
+munge_other_line(const char *buf, cachemgr_request *)
{
static const char *ttags[] = {"td", "th"};
req->workers = xstrdup(q);
else if (0 == strcmp(t, "processes") && strlen(q))
req->processes = xstrdup(q);
+ safe_free(t);
}
if (req->server && !req->hostname) {
buf = (char*)xmalloc(decodedLen);
struct base64_decode_ctx ctx;
base64_decode_init(&ctx);
- base64_decode_update(&ctx, &decodedLen, reinterpret_cast<uint8_t*>(buf), strlen(req->pub_auth), reinterpret_cast<const uint8_t*>(req->pub_auth));
- if (!base64_decode_final(&ctx)) {
+ if (!base64_decode_update(&ctx, &decodedLen, reinterpret_cast<uint8_t*>(buf), strlen(req->pub_auth), reinterpret_cast<const uint8_t*>(req->pub_auth)) ||
+ !base64_decode_final(&ctx)) {
debug("cmgr: base64 decode failure. Incomplete auth token string.\n");
xfree(buf);
return;