Skip to content

Commit

Permalink
Fixed string allocation bug causing a segfault when using -t followed…
Browse files Browse the repository at this point in the history
… by -f parameters.
  • Loading branch information
bingmann committed Aug 20, 2010
1 parent aeb6abe commit 9fc985b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
@@ -0,0 +1,13 @@
2010-08-20 10:49 Timo Bingmann

* src/digup.c: Fixed string allocation bug causing a segfault when
using -t followed by -f parameters.

2010-03-20 14:27 Timo Bingmann

* src/digup.c: Changing size variable from ssize_t to long long to
enable support for large files.

2009-11-10 14:57 Timo Bingmann

* Initial release of 0.6.23
7 changes: 3 additions & 4 deletions src/digup.c
Expand Up @@ -965,6 +965,8 @@ int parse_digestline(const char* line, const unsigned int linenum, struct FileIn

rb_insert(g_filelist, filename, fileinfo);

gopt_digesttype = this_digesttype;

/* return +1 here to clear tempinfo. */
return 1;
}
Expand Down Expand Up @@ -2261,10 +2263,7 @@ int main(int argc, char* argv[])
break;

case 'f':
if (gopt_digestfile)
free(gopt_digestfile);

gopt_digestfile = strdup(optarg);
gopt_digestfile = optarg;
break;

case 'h':
Expand Down

0 comments on commit 9fc985b

Please sign in to comment.