X-Git-Url: https://git.pterodactylus.net/?p=ecparse.git;a=blobdiff_plain;f=ED2KLink.cpp;h=74a38c9aadf2d321d942270cdcba003b741bd1e1;hp=5f33ce872b97c714975bb23ffccfa84b9a96096e;hb=a0eb955ae6aa166e2c54bcbdd2521d75264fd3ad;hpb=123951f2009e356a8c4a2f834252c5d974c36558 diff --git a/ED2KLink.cpp b/ED2KLink.cpp index 5f33ce8..74a38c9 100644 --- a/ED2KLink.cpp +++ b/ED2KLink.cpp @@ -18,7 +18,7 @@ static int getDigits(size_t number) { } ED2KLink::ED2KLink(const char* filename, const size_t size, const void* hash) { - this->filename = (char*) malloc(strlen(filename)); + this->filename = (char*) malloc(strlen(filename) + 1); this->hash = malloc(16); strcpy(this->filename, filename);