Explorar o código

process_metachars should null the end of the processed string, not the end of the original string

madlohe %!s(int64=6) %!d(string=hai) anos
pai
achega
ef7bc20096
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/nrpe.c

+ 1 - 1
src/nrpe.c

@@ -822,7 +822,7 @@ char* process_metachars(const char* input)
 				break;
 				break;
 		}
 		}
 	}
 	}
-	copy[j] = '\0';
+	copy[i] = '\0';
 
 
 	return copy;
 	return copy;
 }
 }