projects
/
ecparse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
123951f
)
reserve enough memory
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 5 Jul 2008 20:49:25 +0000
(22:49 +0200)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sat, 5 Jul 2008 20:49:25 +0000
(22:49 +0200)
ED2KLink.cpp
patch
|
blob
|
history
diff --git
a/ED2KLink.cpp
b/ED2KLink.cpp
index
5f33ce8
..
74a38c9
100644
(file)
--- 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) {
}
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);
this->hash = malloc(16);
strcpy(this->filename, filename);