diff options
Diffstat (limited to 'src/modules/systemlib/mixer/mixer.cpp')
-rw-r--r-- | src/modules/systemlib/mixer/mixer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/systemlib/mixer/mixer.cpp b/src/modules/systemlib/mixer/mixer.cpp index df0dfe838..7d9ddba8f 100644 --- a/src/modules/systemlib/mixer/mixer.cpp +++ b/src/modules/systemlib/mixer/mixer.cpp @@ -142,6 +142,12 @@ NullMixer * NullMixer::from_text(const char *buf, unsigned &buflen) { NullMixer *nm = nullptr; + const char *end = buf + buflen; + + /* require a space or newline at the end of the buffer */ + if (*end != ' ' && *end != '\n' && *end != '\r') { + return nm; + } if ((buflen >= 2) && (buf[0] == 'Z') && (buf[1] == ':')) { nm = new NullMixer; |