Commit ee163abb813467972afae75540d3a59329d02bfd

Authored by Jim Plank
1 parent b5745fa4
Exists in master and in 1 other branch v2

Character counting bug.

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
Examples/encoder.c
... ... @@ -403,7 +403,7 @@ int main (int argc, char **argv) {
403 403 }
404 404  
405 405 /* Break inputfile name into the filename and extension */
406   - s1 = (char*)malloc(sizeof(char)*(strlen(argv[1])+10));
  406 + s1 = (char*)malloc(sizeof(char)*(strlen(argv[1])+20));
407 407 s2 = strrchr(argv[1], '/');
408 408 if (s2 != NULL) {
409 409 s2++;
... ... @@ -421,7 +421,7 @@ int main (int argc, char **argv) {
421 421 }
422 422  
423 423 /* Allocate for full file name */
424   - fname = (char*)malloc(sizeof(char)*(strlen(argv[1])+strlen(curdir)+10));
  424 + fname = (char*)malloc(sizeof(char)*(strlen(argv[1])+strlen(curdir)+20));
425 425 sprintf(temp, "%d", k);
426 426 md = strlen(temp);
427 427  
... ...