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:
marian 2018-03-13 13:07:51 +00:00
parent 7c6c9d5b10
commit 265f016c43
1 changed files with 1 additions and 1 deletions

View File

@ -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();