Piotr Czajkowski 4 years ago
parent
commit
e544f6c8a4
1 changed files with 1 additions and 2 deletions
  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;