Page MenuHomeFreeBSD

D59306.id185571.diff
No OneTemporary

D59306.id185571.diff

diff --git a/sbin/hastd/hast_proto.c b/sbin/hastd/hast_proto.c
--- a/sbin/hastd/hast_proto.c
+++ b/sbin/hastd/hast_proto.c
@@ -150,12 +150,14 @@
eb = ebuf_alloc(hdr.size);
if (eb == NULL)
goto fail;
- if (ebuf_add_tail(eb, NULL, hdr.size) == -1)
- goto fail;
- hptr = ebuf_data(eb, NULL);
- PJDLOG_ASSERT(hptr != NULL);
- if (proto_recv(conn, hptr, hdr.size) == -1)
- goto fail;
+ if (hdr.size > 0) {
+ if (ebuf_add_tail(eb, NULL, hdr.size) == -1)
+ goto fail;
+ hptr = ebuf_data(eb, NULL);
+ PJDLOG_ASSERT(hptr != NULL);
+ if (proto_recv(conn, hptr, hdr.size) == -1)
+ goto fail;
+ }
nv = nv_ntoh(eb);
if (nv == NULL)
goto fail;

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 2, 8:47 PM (1 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37986034
Default Alt Text
D59306.id185571.diff (655 B)

Event Timeline