Browse code

-fixed buf[len+1]=0 (should've been buf[len]=0) in udp_rcv_loop

Andrei Pelinescu-Onciul authored on 10/02/2003 16:20:00
Showing 2 changed files
... ...
@@ -54,7 +54,7 @@
54 54
 
55 55
 
56 56
 /* rounds to the first 4 byte multiple on 32 bit archs 
57
- * and to the first 8 byte mutlipe on 64 bit archs */
57
+ * and to the first 8 byte multipe on 64 bit archs */
58 58
 #define ROUND4(s) \
59 59
 	(((s)+(sizeof(char*)-1))&(~(sizeof(char*)-1)))
60 60
 
... ...
@@ -319,7 +319,7 @@ int udp_rcv_loop()
319 319
 			else goto error;
320 320
 		}
321 321
 		/* we must 0-term the messages, receive_msg expects it */
322
-		buf[len+1]=0; /* no need to save the previous char */
322
+		buf[len]=0; /* no need to save the previous char */
323 323
 
324 324
 #ifndef NO_ZERO_CHECKS
325 325
 		if (len==0) {