mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
Add fuzz targets for decoding of offers, invoice requests, and invoices. Mutators are shared in bolt12.h.
18 lines
373 B
C
18 lines
373 B
C
#include "config.h"
|
|
#include <common/bolt12.h>
|
|
#include <common/utils.h>
|
|
#include <stddef.h>
|
|
#include <tests/fuzz/bolt12.h>
|
|
#include <tests/fuzz/libfuzz.h>
|
|
|
|
const char *bech32_hrp = "lno";
|
|
|
|
void run(const u8 *data, size_t size)
|
|
{
|
|
char *fail;
|
|
|
|
offer_decode(tmpctx, (const char *)data, size, /*feature_set=*/NULL,
|
|
/*must_be_chain=*/NULL, &fail);
|
|
|
|
clean_tmpctx();
|
|
}
|