|
From: <cn...@us...> - 2021-07-21 21:17:42
|
Revision: 1192
http://sourceforge.net/p/seq/svn/1192
Author: cn187
Date: 2021-07-21 21:17:40 +0000 (Wed, 21 Jul 2021)
Log Message:
-----------
Add safety check for formatted message arg sizes.
This works around a crash (due to possible packet changes) until a
proper fix can be found.
Modified Paths:
--------------
showeq/trunk/src/eqstr.cpp
Modified: showeq/trunk/src/eqstr.cpp
===================================================================
--- showeq/trunk/src/eqstr.cpp 2021-07-21 21:17:34 UTC (rev 1191)
+++ showeq/trunk/src/eqstr.cpp 2021-07-21 21:17:40 UTC (rev 1192)
@@ -148,7 +148,7 @@
while (cp < ((unsigned char *) &arguments[argsLen] - sizeof(uint32_t)*sizeof(unsigned char))) {
arg_len = (cp[0] << 0) | (cp[1] << 8) | (cp[2] << 16) | (cp[3] << 24);
cp += 4;
- if (arg_len == 0)
+ if (arg_len == 0 || arg_len > argsLen)
break;
tempStr += " ";
tempStr += QString::fromUtf8((const char *) cp, arg_len);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|