Re: [PATCH 1/2] secur32: Change scan_free_handle to print an error, if the index (handle) is out of range.
24 Mar
2009
24 Mar
'09
7:30 a.m.
2009/3/24 Florian Köberle <florian(a)fkoeberle.de>:
+ if (handle_idx < 0 || handle_idx >= schan_handle_count)
handle_idx can't be < 0 because it's unsigned. Printing an ERR if the handle is out of range is probably ok, but I think crashing is better than just returning NULL.
24 Mar
24 Mar
8:37 a.m.
New subject: [PATCH 1/2] secur32: Change scan_free_handle to print an error, if the index (handle) is out of range.
handle_idx can't be < 0 because it's unsigned. Printing an ERR if the handle is out of range is probably ok, but I think crashing is better than just returning NULL.
I hoped that you would have thought otherwise about returning null. You might still get a crash at some point later, but the patch allows Warcraft III users to stay in the chat room much longer then one minute. I will make and resent an updated patch. Thanks for taking your time to review the patches.
6197
Age (days ago)
6197
Last active (days ago)
1 comments
2 participants
participants (2)
-
Florian Köberle -
Henri Verbeet