Browse Source

May be even better

Piotr Czajkowski 4 years ago
parent
commit
1064976877
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;
 
-	strncpy(url, BASEURL, URL_SIZE - 1);
-	strncat(url, hash, HASH_PREFIX_LENGTH);
+	snprintf(url, URL_SIZE, "%s%s", BASEURL, hash);
 
 	return url;
 }