Fixed vendor value build from individual octets: avoid generating wrong values when octets are promoted to int.
git-svn-id: http://voip.null.ro/svn/yate@6302 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
7c6c9d5b10
commit
265f016c43
|
@ -582,7 +582,7 @@ bool RadAttrib::decode(void* buf, unsigned int len, ObjList& list)
|
|||
}
|
||||
if (attr->isVendor()) {
|
||||
unsigned int len2 = attr->data().length();
|
||||
char* ptr = (char*)attr->data().data();
|
||||
unsigned char* ptr = (unsigned char*)attr->data().data();
|
||||
if ((len2 < 4) || !ptr) {
|
||||
DDebug(&__plugin,DebugMild,"Invalid vendor attribute %u len=%u",attr->code(),len2);
|
||||
attr->destruct();
|
||||
|
|
Loading…
Reference in New Issue