Skip to content
Permalink
Browse files Browse the repository at this point in the history
Bugfix: initiate_stratum: Ensure extranonce2 size is not negative (wh…
…ich could lead to exploits later as too little memory gets allocated)

Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
  • Loading branch information
luke-jr committed Jun 5, 2014
1 parent c80ad85 commit ff7f301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util.c
Expand Up @@ -1705,7 +1705,8 @@ bool initiate_stratum(struct pool *pool)
goto out;
}
n2size = json_integer_value(json_array_get(res_val, 2));
if (!n2size) {
if (n2size < 1)
{
applog(LOG_INFO, "Failed to get n2size in initiate_stratum");
free(sessionid);
free(nonce1);
Expand Down

0 comments on commit ff7f301

Please sign in to comment.