summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Plank <plank@cs.utk.edu>2013-10-01 13:26:24 -0400
committerJim Plank <plank@cs.utk.edu>2013-10-01 13:26:24 -0400
commitee163abb813467972afae75540d3a59329d02bfd (patch)
treeaf8d9f9ca6c83dc4807fcfb5921bcd778aaa3dea
parentb5745fa4f1bdc3521153ca4fb51c6e7bae5b1511 (diff)
downloadjerasure-ee163abb813467972afae75540d3a59329d02bfd.tar.gz
Character counting bug.
-rwxr-xr-xExamples/encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Examples/encoder.c b/Examples/encoder.c
index 11eb9c1..b0f6d31 100755
--- a/Examples/encoder.c
+++ b/Examples/encoder.c
@@ -403,7 +403,7 @@ int main (int argc, char **argv) {
}
/* Break inputfile name into the filename and extension */
- s1 = (char*)malloc(sizeof(char)*(strlen(argv[1])+10));
+ s1 = (char*)malloc(sizeof(char)*(strlen(argv[1])+20));
s2 = strrchr(argv[1], '/');
if (s2 != NULL) {
s2++;
@@ -421,7 +421,7 @@ int main (int argc, char **argv) {
}
/* Allocate for full file name */
- fname = (char*)malloc(sizeof(char)*(strlen(argv[1])+strlen(curdir)+10));
+ fname = (char*)malloc(sizeof(char)*(strlen(argv[1])+strlen(curdir)+20));
sprintf(temp, "%d", k);
md = strlen(temp);