Fixed nasty crash if a user sends a very large command to the hub.

Will overwrite heap memory.
Thanks to Toast who found this bug.

Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
This commit is contained in:
Jan Vidar Krey
2009-03-21 02:58:53 +01:00
parent abedec692a
commit 1a1b5bdb38
2 changed files with 59 additions and 40 deletions

View File

@@ -47,11 +47,12 @@ enum user_flags
feature_ping = 0x00000080, /** PING: Hub pinger information extension */
feature_link = 0x00000100, /** LINK: Hub link (not supported) */
flag_ignore = 0x01000000, /** Ignore further reads */
flag_choke = 0x02000000, /** Choked: Cannot send, waiting for write event */
flag_want_read = 0x04000000, /** Need to read (SSL) */
flag_want_write = 0x08000000, /** Need to write (SSL) */
flag_user_list = 0x10000000, /** Send queue bypass (when receiving the send queue) */
flag_nat = 0x20000000, /** nat override enabled */
flag_maxbuf = 0x02000000, /** Hit max buf read, ignore msg */
flag_choke = 0x04000000, /** Choked: Cannot send, waiting for write event */
flag_want_read = 0x08000000, /** Need to read (SSL) */
flag_want_write = 0x10000000, /** Need to write (SSL) */
flag_user_list = 0x20000000, /** Send queue bypass (when receiving the send queue) */
flag_nat = 0x40000000, /** nat override enabled */
};