Prechádzať zdrojové kódy

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

Andrei Pelinescu-Onciul 22 rokov pred
rodič
commit
610cb10e74
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      modules/tm/sip_msg.c
  2. 1 1
      udp_server.c

+ 1 - 1
modules/tm/sip_msg.c

@@ -54,7 +54,7 @@
 
 
 /* rounds to the first 4 byte multiple on 32 bit archs 
- * and to the first 8 byte mutlipe on 64 bit archs */
+ * and to the first 8 byte multipe on 64 bit archs */
 #define ROUND4(s) \
 	(((s)+(sizeof(char*)-1))&(~(sizeof(char*)-1)))
 

+ 1 - 1
udp_server.c

@@ -319,7 +319,7 @@ int udp_rcv_loop()
 			else goto error;
 		}
 		/* we must 0-term the messages, receive_msg expects it */
-		buf[len+1]=0; /* no need to save the previous char */
+		buf[len]=0; /* no need to save the previous char */
 
 #ifndef NO_ZERO_CHECKS
 		if (len==0) {