Round some more static string arrays to 4 byte boundaries.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
diff --git a/cgminer.c b/cgminer.c
index 04ba468..8b3404c 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -82,7 +82,7 @@ struct strategies strategies[] = {
{ "Balance" },
};
-static char packagename[255];
+static char packagename[256];
bool opt_protocol;
static bool opt_benchmark;
@@ -218,7 +218,7 @@ static char current_block[40];
static char *current_hash;
char *current_fullhash;
static char datestamp[40];
-static char blocktime[30];
+static char blocktime[32];
struct timeval block_timeval;
static char best_share[8] = "0";
static uint64_t best_diff = 0;
@@ -1801,7 +1801,7 @@ static void get_statline(char *buf, struct cgpu_info *cgpu)
static void text_print_status(int thr_id)
{
struct cgpu_info *cgpu = thr_info[thr_id].cgpu;
- char logline[255];
+ char logline[256];
if (cgpu) {
get_statline(logline, cgpu);
@@ -1862,7 +1862,7 @@ static void curses_print_devstatus(int thr_id)
{
static int awidth = 1, rwidth = 1, hwwidth = 1, uwidth = 1;
struct cgpu_info *cgpu = thr_info[thr_id].cgpu;
- char logline[255];
+ char logline[256];
char displayed_hashes[16], displayed_rolling[16];
uint64_t dh64, dr64;
@@ -2173,7 +2173,7 @@ share_result(json_t *val, json_t *res, json_t *err, const struct work *work,
pool->seq_rejects++;
applog(LOG_DEBUG, "PROOF OF WORK RESULT: false (booooo)");
if (!QUIET) {
- char where[17];
+ char where[20];
char disposition[36] = "reject";
char reason[32];
@@ -2237,7 +2237,7 @@ static const uint64_t diffone = 0xFFFF000000000000ull;
static uint64_t share_diff(const struct work *work)
{
uint64_t *data64, d64;
- char rhash[36];
+ char rhash[32];
uint64_t ret;
swab256(rhash, work->hash);
@@ -2280,7 +2280,7 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
int rolltime;
uint32_t *hash32;
struct timeval tv_submit, tv_submit_reply;
- char hashshow[64 + 1] = "";
+ char hashshow[64 + 4] = "";
char worktime[200] = "";
#ifdef __BIG_ENDIAN__
@@ -2417,7 +2417,7 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
if (!opt_realquiet)
print_status(thr_id);
if (!want_per_device_stats) {
- char logline[255];
+ char logline[256];
get_statline(logline, cgpu);
applog(LOG_INFO, "%s", logline);
@@ -2495,7 +2495,7 @@ static void calc_diff(struct work *work, int known)
if (opt_scrypt) {
uint64_t *data64, d64;
- char rtarget[36];
+ char rtarget[32];
swab256(rtarget, work->target);
data64 = (uint64_t *)(rtarget + 2);