Parcourir la source

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

madlohe il y a 5 ans
Parent
commit
ef7bc20096
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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;
 }