summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_con/ecore_con.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-12-09 21:02:53 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-12-09 21:02:53 +0000
commit4912e6dc4f3fc19e7b8c4bf94c485b3da7ab6861 (patch)
tree9c61cc4031b4045805a2c8b780b7c551239e66f0 /legacy/ecore/src/lib/ecore_con/ecore_con.c
parent78a75afd7b41c1e91e5cccf9851bf9754a58cd92 (diff)
this error fix is dedicated to Tommy[D] for continuing to prove that the impossible can still be possible on his system
SVN revision: 55432
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c
index 3b7f81bfa6..4349e26597 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c
@@ -2231,14 +2231,16 @@ _ecore_con_server_flush(Ecore_Con_Server *svr)
2231 if (!svr->write_buf) 2231 if (!svr->write_buf)
2232 return; 2232 return;
2233 2233
2234 num = svr->write_buf_size - svr->write_buf_offset;
2235
2234 /* check whether we need to write anything at all. 2236 /* check whether we need to write anything at all.
2235 * we must not write zero bytes with SSL_write() since it 2237 * we must not write zero bytes with SSL_write() since it
2236 * causes undefined behaviour 2238 * causes undefined behaviour
2237 */ 2239 */
2238 if (svr->write_buf_size == svr->write_buf_offset) 2240 /* we thank Tommy[D] for needing to check negative buffer sizes
2239 return; 2241 * here because his system is amazing.
2240 2242 */
2241 num = svr->write_buf_size - svr->write_buf_offset; 2243 if (num <= 0) return;
2242 2244
2243 if (svr->handshaking) 2245 if (svr->handshaking)
2244 { 2246 {