What changed, and why it matters
This commit fixes a build failure when compiling the fuzz tests on FreeBSD. FreeBSD's system headers already define a 'struct splice', so the project's own test-only structure with the same name clashed. The developer renamed it to 'struct fuzzsplice'. This is a portability/build fix, not a security issue.
No security action needed. Treat as a normal build/portability fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff renames a local test-only structure from struct splice to struct fuzzsplice in tests/fuzz/fuzz-wire-splice.c and updates all references. The change is purely to avoid a name collision with FreeBSD’s struct splice in <sys/socket.h>. It affects only fuzz-test code and does not alter runtime behavior, protocol handling, or memory safety.
Changed components
tests/fuzz/fuzz-wire-splice.cInspect captured patch +6 / −6
diff --git a/tests/fuzz/fuzz-wire-splice.c b/tests/fuzz/fuzz-wire-splice.c
index 54b62d20..35a8d9ad 100644
--- a/tests/fuzz/fuzz-wire-splice.c
+++ b/tests/fuzz/fuzz-wire-splice.c
@@ -3,7 +3,7 @@
#include <tests/fuzz/wire.h>
#include <wire/peer_wire.h>
-struct splice {
+struct fuzzsplice {
struct channel_id channel_id;
s64 relative_satoshis;
u32 funding_feerate_perkw;
@@ -11,16 +11,16 @@ struct splice {
struct pubkey funding_pubkey;
};
-static void *encode(const tal_t *ctx, const struct splice *s)
+static void *encode(const tal_t *ctx, const struct fuzzsplice *s)
{
return towire_splice(ctx, &s->channel_id,
s->relative_satoshis, s->funding_feerate_perkw,
s->locktime, &s->funding_pubkey);
}
-static struct splice *decode(const tal_t *ctx, const void *p)
+static struct fuzzsplice *decode(const tal_t *ctx, const void *p)
{
- struct splice *s = tal(ctx, struct splice);
+ struct fuzzsplice *s = tal(ctx, struct fuzzsplice);
if (fromwire_splice(p, &s->channel_id,
&s->relative_satoshis, &s->funding_feerate_perkw,
@@ -29,12 +29,12 @@ static struct splice *decode(const tal_t *ctx, const void *p)
return tal_free(s);
}
-static bool equal(const struct splice *x, const struct splice *y)
+static bool equal(const struct fuzzsplice *x, const struct fuzzsplice *y)
{
return memcmp(x, y, sizeof(*x)) == 0;
}
void run(const u8 *data, size_t size)
{
- test_decode_encode(data, size, WIRE_SPLICE, struct splice);
+ test_decode_encode(data, size, WIRE_SPLICE, struct fuzzsplice);
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.