aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-09 17:39:32 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-09 17:39:32 +0200
commitf9bdf5bec2f3778c4fef99da698a8a7a6f182fe0 (patch)
treea755c6a600159a57637d18e435cf4a07899acd13
parente27386aeb2a97f56cde8be9c115972c4013edd2a (diff)
downloaddabmux-f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0.tar.gz
dabmux-f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0.tar.bz2
dabmux-f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0.zip
Fix uninitialised data Valgrind sees
-rw-r--r--src/MuxElements.h3
-rw-r--r--src/dabInputDabplusFile.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/MuxElements.h b/src/MuxElements.h
index d714c76..4d770e9 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -184,7 +184,8 @@ class dabSubchannel
{
public:
dabSubchannel(std::string& uid) :
- uid(uid)
+ uid(uid),
+ id(0)
{
}
diff --git a/src/dabInputDabplusFile.cpp b/src/dabInputDabplusFile.cpp
index c435aba..396a376 100644
--- a/src/dabInputDabplusFile.cpp
+++ b/src/dabInputDabplusFile.cpp
@@ -84,6 +84,7 @@ int dabInputDabplusFileRead(void* args, void* buffer, int size)
delete[] data->buffer;
}
data->buffer = new uint8_t[size * 5];
+ memset(data->buffer, 0, size * 5);
data->bufferSize = size * 5;
data->bufferIndex = 0;
}