You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
481 B
23 lines
481 B
4 years ago
|
#include "common/utils.h"
|
||
|
#include <stdint.h>
|
||
|
#include <tests/fuzz/libfuzz.h>
|
||
|
|
||
|
#include <ccan/ccan/tal/tal.h>
|
||
|
#include <common/addr.h>
|
||
|
#include <common/setup.h>
|
||
|
|
||
|
void init(int *argc, char ***argv)
|
||
|
{
|
||
|
chainparams = chainparams_for_network("bitcoin");
|
||
|
common_setup("fuzzer");
|
||
|
}
|
||
|
|
||
|
void run(const uint8_t *data, size_t size)
|
||
|
{
|
||
|
uint8_t *script_pubkey = tal_dup_arr(tmpctx, uint8_t, data, size, 0);
|
||
|
|
||
|
encode_scriptpubkey_to_addr(tmpctx, chainparams, script_pubkey);
|
||
|
|
||
|
clean_tmpctx();
|
||
|
}
|