Răsfoiți Sursa

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

madlohe 5 ani în urmă
părinte
comite
ef7bc20096
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/nrpe.c

+ 1 - 1
src/nrpe.c

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