Transferring a change from main 5.5 into the 5.5.17 build:
| revision-id: rafal.somla@oracle.com-20110929150216-jl3y54s54w04y2vu | parent: marko.makela@oracle.com-20110929123146-03lcg1vixncyviyn | committer: Rafal Somla <rafal.somla@oracle.com> | branch nick: bug12982926 | timestamp: Thu 2011-09-29 17:02:16 +0200 | message: | Bug#12982926 CLIENT CAN OVERRIDE ZERO-LENGTH-ALLOCATE BUFFER | | Changes in client plugin needed for testing the issue (test instrumentation).
This commit is contained in:
parent
e9ebced50a
commit
ea22ebe75a
@ -161,6 +161,21 @@ int Handshake_client::write_packet(Blob &data)
|
|||||||
keep all the data.
|
keep all the data.
|
||||||
*/
|
*/
|
||||||
unsigned block_count= data.len()/512 + ((data.len() % 512) ? 1 : 0);
|
unsigned block_count= data.len()/512 + ((data.len() % 512) ? 1 : 0);
|
||||||
|
|
||||||
|
#if !defined(DBUG_OFF) && defined(WINAUTH_USE_DBUG_LIB)
|
||||||
|
|
||||||
|
/*
|
||||||
|
For testing purposes, use wrong block count to see how server
|
||||||
|
handles this.
|
||||||
|
*/
|
||||||
|
DBUG_EXECUTE_IF("winauth_first_packet_test",{
|
||||||
|
block_count= data.len() == 601 ? 0 :
|
||||||
|
data.len() == 602 ? 1 :
|
||||||
|
block_count;
|
||||||
|
});
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
DBUG_ASSERT(block_count < (unsigned)0x100);
|
DBUG_ASSERT(block_count < (unsigned)0x100);
|
||||||
saved_byte= data[254];
|
saved_byte= data[254];
|
||||||
data[254] = block_count;
|
data[254] = block_count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user