mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-28 01:24:42 +01:00
4ffda340d3
And turn "" includes into full-path (which makes it easier to put config.h first, and finds some cases check-includes.sh missed previously). config.h sets _GNU_SOURCE which really needs to be done before any '#includes': we mainly got away with it with glibc, but other platforms like Alpine may have stricter requirements. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
21 lines
415 B
C
21 lines
415 B
C
#include "config.h"
|
|
#include <tests/fuzz/libfuzz.h>
|
|
|
|
#include <common/descriptor_checksum.h>
|
|
|
|
void init(int *argc, char ***argv)
|
|
{
|
|
}
|
|
|
|
void run(const uint8_t *data, size_t size)
|
|
{
|
|
char *string;
|
|
struct descriptor_checksum checksum;
|
|
|
|
/* We should not crash nor overflow the checksum buffer. */
|
|
|
|
string = to_string(NULL, data, size);
|
|
descriptor_checksum(string, tal_count(string), &checksum);
|
|
tal_free(string);
|
|
}
|