Date: Mon, 06 Oct 2025 16:43:32 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 290050] netlink: snl_init_writer() does not report the error flag appropriately Message-ID: <bug-290050-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
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: bugs@FreeBSD.org Reporter: bruno.silvestre@gmail.com 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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-290050-227>
