Skip to content

Commit

Permalink
show_hash doesn't know the size of the string so hard code the max size.
Browse files Browse the repository at this point in the history
  • Loading branch information
ckolivas committed Nov 2, 2013
1 parent 57d6a6f commit e6a5068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cgminer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2727,8 +2727,8 @@ static void show_hash(struct work *work, char *hashshow)
h32 = be32toh(*hash32);
intdiff = round(work->work_difficulty);
suffix_string(work->share_diff, diffdisp, sizeof (diffdisp), 0);
snprintf(hashshow, sizeof(hashshow), "%08lx Diff %s/%d%s", h32, diffdisp,
intdiff, work->block? " BLOCK!" : "");
snprintf(hashshow, 64, "%08lx Diff %s/%d%s", h32, diffdisp, intdiff,
work->block? " BLOCK!" : "");
}

static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
Expand Down

0 comments on commit e6a5068

Please sign in to comment.