https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290050
Bug ID: 290050
Summary: netlink: snl_init_writer() does not report the error
flag appropriately
Product: Base System
Version: 14.3-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
snl_init_writer() always set the error flag as 'false'.
Here is a fix suggestion:
--- netlink_snl_old.h 2025-10-02 14:17:36.369302000 -0300
+++ netlink_snl.h 2025-10-02 14:17:56.411429000 -0300
@@ -1021,20 +1021,20 @@
};
static inline void
snl_init_writer(struct snl_state *ss, struct snl_writer *nw)
{
+ nw->error = false;
nw->size = SNL_WRITER_BUFFER_SIZE;
nw->base = (char *)snl_allocz(ss, nw->size);
if (nw->base == NULL) {
nw->error = true;
nw->size = 0;
}
nw->offset = 0;
nw->hdr = NULL;
- nw->error = false;
nw->ss = ss;
}
static inline bool
snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz)
--
You are receiving this mail because:
You are the assignee for the bug.