aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ModuleFileExtension.cpp
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2026-09-03 07:51:28 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2026-09-03 07:58:54 +0000
commit8646d65b45339642d4aab1de35a2bc79fc45f09e (patch)
tree640cd0d2dacdf918b77340ab0b3f5f0fd843cf19 /lib/Serialization/ModuleFileExtension.cpp
parent37aec55d0a7165960f686e5277f030ab3d44cf45 (diff)
hastd: Fix crash on empty message
A HAST message can be empty, in which case ebuf_add_tail() does nothing and ebuf_data() returns NULL because the size of the ebuf is zero, but hast_proto_recv_hdr() asserts that the return value is not NULL, resulting in an immediate crash if hastctl or hastd receive an empty message. This is trivially reproducable by running `hastctl status` or `hastctl role init` (as the rc script does prior to stopping hastd). To avoid this, don't try to grow the ebuf or receive additional data if the header size is zero. PR: 298085 MFC after: 3 days Reviewed by: kevans, gjb Differential Revision: https://reviews.freebsd.org/D59306
Diffstat (limited to 'lib/Serialization/ModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions