/[packages]/updates/2/freeciv/current/SOURCES/freeciv-2.3.2-CVE-2012-5645.patch
ViewVC logotype

Contents of /updates/2/freeciv/current/SOURCES/freeciv-2.3.2-CVE-2012-5645.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344778 - (show annotations) (download)
Thu Jan 10 18:46:34 2013 UTC (11 years, 9 months ago) by luigiwalser
File size: 922 byte(s)
add upstream patch to fix CVE-2012-5645
1 --- trunk/common/packets.c 2012/07/31 22:29:54 21669
2 +++ trunk/common/packets.c 2012/07/31 22:41:50 21670
3 @@ -339,7 +339,7 @@
4 return a NULL packet even if everything is OK (receive_packet_goto_route).
5 **************************************************************************/
6 void *get_packet_from_connection(struct connection *pc,
7 - enum packet_type *ptype, bool * presult)
8 + enum packet_type *ptype, bool *presult)
9 {
10 int len_read;
11 int whole_packet_len;
12 @@ -396,6 +396,14 @@
13 return NULL; /* not all data has been read */
14 }
15
16 + if (whole_packet_len < header_size) {
17 + log_verbose("The packet size is reported to be less than header alone. "
18 + "The connection will be closed now.");
19 + connection_close(pc, _("illegal packet size"));
20 +
21 + return NULL;
22 + }
23 +
24 #ifdef USE_COMPRESSION
25 if (compressed_packet) {
26 uLong compressed_size = whole_packet_len - header_size;

  ViewVC Help
Powered by ViewVC 1.1.30