Bug #2366 » 0026-Stop-attempts-to-send-too-long-goto-routes-to-the-se.patch
| common/city.c | ||
|---|---|---|
|
if (0 > packet->length || MAX_LEN_ROUTE < packet->length) {
|
||
|
/* Shouldn't happen */
|
||
|
log_error("city_rally_point_receive() invalid packet length %d (max %d)",
|
||
|
log_error("city_rally_point_receive() invalid packet length %d (max "
|
||
|
SIZE_T_PRINTF ")",
|
||
|
packet->length, MAX_LEN_ROUTE);
|
||
|
return;
|
||
|
}
|
||
| common/networking/conn_types.h | ||
|---|---|---|
|
#define MAX_LEN_BUFFER (MAX_LEN_PACKET * 128)
|
||
|
/* Used in network protocol. */
|
||
|
#define MAX_LEN_MSG 1536
|
||
|
#define MAX_LEN_ROUTE 2000 /* MAX_LEN_PACKET / 2 - header */
|
||
|
#define MAX_LEN_MSG 1536
|
||
|
#define MAX_LEN_ROUTE ((MAX_LEN_CONTENT - 100) / sizeof(struct unit_order))
|
||
|
/* Used in network protocol. */
|
||
|
enum authentication_type {
|
||
| server/unithand.c | ||
|---|---|---|
|
if (0 > length || MAX_LEN_ROUTE < length) {
|
||
|
/* Shouldn't happen */
|
||
|
log_error("handle_unit_orders() invalid %s (%d) "
|
||
|
"packet length %d (max %d)", unit_rule_name(punit),
|
||
|
packet->unit_id, length, MAX_LEN_ROUTE);
|
||
|
"packet length %d (max " SIZE_T_PRINTF ")",
|
||
|
unit_rule_name(punit), packet->unit_id, length,
|
||
|
MAX_LEN_ROUTE);
|
||
|
return;
|
||
|
}
|
||
- « Previous
- 1
- 2
- 3
- Next »