Skip to content

Commit 20728c6

Browse files
committed
localize hex buffers
1 parent effc891 commit 20728c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

brainflayer.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ static unsigned char *mem;
4343
static mmapf_ctx bloom_mmapf;
4444
static unsigned char *bloom = NULL;
4545

46-
static unsigned char hexed0[41];
47-
static unsigned char hexed1[41];
48-
static unsigned char hexed2[65];
49-
5046
static unsigned char *unhexed = NULL;
5147
static size_t unhexed_sz = 4096;
5248

@@ -241,6 +237,8 @@ inline static void fprintresult(FILE *f, hash160_t *hash,
241237
unsigned char compressed,
242238
unsigned char *type,
243239
unsigned char *input) {
240+
unsigned char hexed0[41];
241+
244242
fprintf(f, "%s:%c:%s:%s\n",
245243
hex(hash->uc, 20, hexed0, sizeof(hexed0)),
246244
compressed,
@@ -254,6 +252,8 @@ inline static void fprintlookup(FILE *f,
254252
unsigned char *priv,
255253
unsigned char *type,
256254
unsigned char *input) {
255+
unsigned char hexed0[41], hexed1[41], hexed2[65];
256+
257257
fprintf(f, "%s:%s:%s:%s:%s\n",
258258
hex(hashu->uc, 20, hexed0, sizeof(hexed0)),
259259
hex(hashc->uc, 20, hexed1, sizeof(hexed1)),

0 commit comments

Comments
 (0)