mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
5787e18e69
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
22 lines
450 B
C
22 lines
450 B
C
#include "config.h"
|
|
|
|
#include <common/addr.h>
|
|
#include <common/setup.h>
|
|
#include <common/utils.h>
|
|
#include <tests/fuzz/libfuzz.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();
|
|
}
|