File alog-bufferoverflow.patch of Package mpich

copying the string into the first 12 chars of x into  c is not needed.
xx_write() does exactly the same stuff again later. (line 77)

so instead of copying the data here and copy it again later we pass the
full length x to xx_write() and let it cut there.

--- mpid/ch_p4/p4/alog/alog.c
+++ mpid/ch_p4/p4/alog/alog.c
@@ -243,9 +243,9 @@
 	strcat(x,"-");
 	strncat(x,cd+22,2);	
 
-	strcpy(c,"            ");
-	strncpy(c,x,12);
-	xx_write(head,0,(-1),0,c);
+//	strcpy(c,"            ");
+//	strncpy(c,x,12);
+	xx_write(head,0,(-1),0,x);
 
 	sprintf(x,"%lu", (unsigned long) usc_rollover_val());
 	xx_write(head,0,(-11),0,x);
openSUSE Build Service is sponsored by