From c0dcbcea97fc346fef2b1243bd780633f935a748 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 2 May 2013 11:35:01 +0200 Subject: [PATCH] Avoid potentially accessing uninitialized values --- src/common/base64.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/base64.cpp b/src/common/base64.cpp index 53493f034..4a3d8f7af 100644 --- a/src/common/base64.cpp +++ b/src/common/base64.cpp @@ -122,6 +122,7 @@ base64_decode(const std::string &src, unsigned int values_idx; unsigned char values[4]; + memset(values, 0, 4); for (values_idx = 0; values_idx < in_pos; values_idx++) { values[values_idx] = (('A' <= in[values_idx]) && ('Z' >= in[values_idx])) ? in[values_idx] - 'A'