23.07.2018 19:45, Adriano dos Santos Fernandes wrote:
On 23/07/2018 13:18, Mark Rotteveel wrote:
On 23-7-2018 17:25, Adriano dos Santos Fernandes wrote:
On 23/07/2018 11:12, Mark Rotteveel wrote:
The problem can't be reproduced with the native client, which suggests
Jaybird does something wrong, or this is something that is only
triggered by what Jaybird does.
Mark, are you dealing with this situation re. partial packets with
negative lengths?
// Send data in manageable hunks. If a packet is partial, indicate
// that with a negative length. A positive length marks the end.
Those lengths don't surface in the wire protocol itself, but I do
wonder, if length can be negative, whether the following is correct:
const SSHORT l = (SSHORT) MIN(length, INET_remote_buffer)
IIRC, it never can be negative. See code few lines upper (it is at
inet.cpp\inet_write()):
const char* p = xdrs->x_base;
USHORT length = xdrs->x_private - p;
Here, AFAIR, x_base points to the buffer (with size of INET_remote_buffer)
and x_private is a pointer to the first unused byte in buffer.
Note, upper allowed value for INET_remote_buffer is MAX_DATA_HW (32768).
If packet_send is called with a negative length, it will try to allocate
(getBuffer) negative number of bytes and send negative count of bytes,
so I have no idea what this mean.
It will crash, sooner of all.
Regards,
Vlad
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel