--- deliantra/server/socket/request.C 2007/07/29 18:34:46 1.117 +++ deliantra/server/socket/request.C 2007/07/29 19:11:47 1.118 @@ -1390,7 +1390,7 @@ for (int i = 1; i < NUM_SKILLS; i++) sl.printf ("%d:%s\n", i + CS_STAT_SKILLINFO, &skill_names[i]); - if (sl.length () >= MAXSOCKBUF) + if (sl.length () > MAXSOCKBUF) { LOG (llevError, "Buffer overflow in send_skill_info!\n"); fatal (0); @@ -1413,7 +1413,7 @@ for (int i = 0; i < NRSPELLPATHS; i++) sl.printf ("%d:%s\n", 1 << i, spellpathnames[i]); - if (sl.length () >= MAXSOCKBUF) + if (sl.length () > MAXSOCKBUF) { LOG (llevError, "Buffer overflow in send_spell_paths!\n"); fatal (0); @@ -1586,7 +1586,7 @@ * is hundreds of bytes off, so correcting 22 vs 26 doesn't seem * like it will fix this */ - if (sl.length () >= (MAXSOCKBUF - (26 + strlen (spell->name) + (spell->msg ? strlen (spell->msg) : 0)))) + if (sl.length () > (MAXSOCKBUF - (26 + strlen (spell->name) + (spell->msg ? strlen (spell->msg) : 0)))) { pl->ns->flush_fx (); pl->ns->send_packet (sl); @@ -1606,7 +1606,7 @@ else append_spell (pl, sl, spell); - if (sl.length () >= MAXSOCKBUF) + if (sl.length () > MAXSOCKBUF) { LOG (llevError, "Buffer overflow in esrv_add_spells!\n"); fatal (0);