summaryrefslogtreecommitdiff
blob: 37f54b981fff38d3294e853ffc585f7a2580ea70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- src/common/dcc.c.orig	2003-12-12 16:49:28.523536903 -0800
+++ src/common/dcc.c	2003-12-12 16:50:50.339644657 -0800
@@ -1659,6 +1659,11 @@
 			 * sending file.
 			 */
 			dcc = find_dcc_from_id (pasvid, TYPE_SEND);
+			/* defensive check for malformed requests */
+			if( dcc == NULL ) {
+			  dcc_malformed( sess, nick, word_eol[4] + 2 );
+			  return;
+			}
 			dcc->addr = addr;
 			dcc->port = port;
 			dcc_connect(dcc);