Piotr Czajkowski hace 4 años
padre
commit
e544f6c8a4
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      pwned.c

+ 1 - 2
pwned.c

@@ -15,8 +15,7 @@ char *getURL(const char* hash) {
 	char *url = malloc(URL_SIZE);
 	if (url == NULL) return NULL;
 
-	size_t toCopy = BASEURL_SIZE;
-	strncpy(url, BASEURL, toCopy);
+	strncpy(url, BASEURL, URL_SIZE - 1);
 	strncat(url, hash, HASH_PREFIX_LENGTH);
 
 	return url;