null terminate payload

This commit is contained in:
Jethro Grassie 2019-05-05 01:37:49 -04:00
parent f70955d648
commit 5d84d80c61
No known key found for this signature in database
GPG key ID: DE8ED755616565BB

View file

@ -865,7 +865,7 @@ startup_pauout(uint64_t height)
pool_stats.last_block_found = block->timestamp;
if (block->height > height - 60)
break;
continue;
if (block->status & BLOCK_UNLOCKED || block->status & BLOCK_ORPHANED)
continue;
@ -1158,16 +1158,14 @@ rpc_get_request_body(char *body, const char* method, char* fmt, ...)
pb += strlen(pb);
break;
}
char append = ':';
if (count++ % 2 != 0)
append = ',';
*pb++ = append;
*pb++ = count++ % 2 ? ',' : ':';
}
va_end(args);
*--pb = '}';
pb++;
}
*pb = '}';
*pb++ = '}';
*pb = '\0';
log_trace("Payload: %s", body);
}