summaryrefslogtreecommitdiffstats
path: root/net/ser/files/patch-udp_server.c
blob: 89b155fd55834305599b74cb8883ec1902964335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

$FreeBSD$

--- udp_server.c
+++ udp_server.c
@@ -432,6 +432,10 @@
 				continue; /* goto skip;*/
 			else goto error;
 		}
+		if (len < 128) {
+			/* Message is too short, just drop it already */
+			continue;
+		}
 		/* we must 0-term the messages, receive_msg expects it */
 		buf[len]=0; /* no need to save the previous char */
 
OpenPOWER on IntegriCloud