You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Have a simple error while processed Message body (AMQPMessage::setMessage).
At start & if length this->data > length you have undefined stay \0 in the this->data (corrupt body).
Instead :
line 30:
this->data = (char*)malloc(length);
memcpy(this->data,data,length);
I offer:
this->data = (char*)malloc(length+1);
this->data[length]='\0';
if (!this->data) {
throw AMQPException("cannot alocate memory for data");
}
strncpy(this->data,data,length);
wbr,
buy.
The text was updated successfully, but these errors were encountered:
Hi!
Have a simple error while processed Message body (AMQPMessage::setMessage).
At start & if length this->data > length you have undefined stay \0 in the this->data (corrupt body).
Instead :
line 30:
this->data = (char*)malloc(length);
memcpy(this->data,data,length);
I offer:
this->data = (char*)malloc(length+1);
this->data[length]='\0';
if (!this->data) {
throw AMQPException("cannot alocate memory for data");
}
strncpy(this->data,data,length);
wbr,
buy.
The text was updated successfully, but these errors were encountered: