diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-09 17:39:32 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-09 17:39:32 +0200 |
commit | f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0 (patch) | |
tree | a755c6a600159a57637d18e435cf4a07899acd13 | |
parent | e27386aeb2a97f56cde8be9c115972c4013edd2a (diff) | |
download | dabmux-f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0.tar.gz dabmux-f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0.tar.bz2 dabmux-f9bdf5bec2f3778c4fef99da698a8a7a6f182fe0.zip |
Fix uninitialised data Valgrind sees
-rw-r--r-- | src/MuxElements.h | 3 | ||||
-rw-r--r-- | src/dabInputDabplusFile.cpp | 1 |
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; } |