diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/MuxElements.cpp | 2 | ||||
-rw-r--r-- | src/dabOutput/edi/TagPacket.cpp | 7 |
4 files changed, 8 insertions, 7 deletions
@@ -1,6 +1,10 @@ This file contains information about the changes done to the ODR-DabMux in this repository +2015-07-27: Matthias P. Braendli <matthias@mpb.li> + (v0.7.5): + Fix segmentation fault in short label check logic. + 2015-07-03: Matthias P. Braendli <matthias@mpb.li> (v0.7.4): Allow empty component labels diff --git a/configure.ac b/configure.ac index a24258b..bdc7328 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ # along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>. AC_PREREQ(2.61) -AC_INIT([ODR-DabMux], [0.7.4], [matthias.braendli@mpb.li]) +AC_INIT([ODR-DabMux], [0.7.5], [matthias.braendli@mpb.li]) AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([-Wall subdir-objects foreign]) diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp index 4bd82cd..3170fe1 100644 --- a/src/MuxElements.cpp +++ b/src/MuxElements.cpp @@ -105,7 +105,7 @@ int DabLabel::setShortLabel(const std::string& slabel) for (size_t i = 0; i < m_label.size(); ++i) { if (*slab == m_label[i]) { flag |= 0x8000 >> i; - if (*(++slab) == 0) { + if (*(++slab) == '\0') { break; } } diff --git a/src/dabOutput/edi/TagPacket.cpp b/src/dabOutput/edi/TagPacket.cpp index fbb0f8b..aa4f23b 100644 --- a/src/dabOutput/edi/TagPacket.cpp +++ b/src/dabOutput/edi/TagPacket.cpp @@ -31,6 +31,7 @@ #include <string> #include <list> #include <stdint.h> +#include <cassert> std::vector<uint8_t> TagPacket::Assemble() @@ -41,21 +42,17 @@ std::vector<uint8_t> TagPacket::Assemble() //std::cerr << "Assemble TAGPacket" << std::endl; - size_t packet_length = 0; for (tag = tag_items.begin(); tag != tag_items.end(); ++tag) { std::vector<uint8_t> tag_data = (*tag)->Assemble(); packet.insert(packet.end(), tag_data.begin(), tag_data.end()); - packet_length += tag_data.size(); - //std::cerr << " Add TAGItem of length " << tag_data.size() << std::endl; } // Add padding - while (packet_length % 8 > 0) + while (packet.size() % 8 > 0) { packet.push_back(0); // TS 102 821, 5.1, "padding shall be undefined" - packet_length++; } return packet; |