Fixed modutil_replace_SQL not modifying the packet length when the replacement was shorter.
This commit is contained in:
@ -206,6 +206,10 @@ GWBUF *addition;
|
|||||||
/* New SQL is shorter */
|
/* New SQL is shorter */
|
||||||
memcpy(ptr, sql, newlength);
|
memcpy(ptr, sql, newlength);
|
||||||
GWBUF_RTRIM(orig, (length - 1) - newlength);
|
GWBUF_RTRIM(orig, (length - 1) - newlength);
|
||||||
|
ptr = GWBUF_DATA(orig);
|
||||||
|
*ptr++ = (newlength + 1) & 0xff;
|
||||||
|
*ptr++ = ((newlength + 1) >> 8) & 0xff;
|
||||||
|
*ptr++ = ((newlength + 1) >> 16) & 0xff;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user