# HG changeset patch # User Josef 'Jeff' Sipek # Date 1688178190 14400 # Fri Jun 30 22:23:10 2023 -0400 # Node ID d2f26abb0a0bbd2ef843257b15d49c43e7aa1735 # Parent 498324d3c2e68625e76ef6924e48bd702515f57f common: error out if hlq packing encounteres bool type with too old version The bool type was introduces in HLQ version 1. We should never see it in an older version. Signed-off-by: Josef 'Jeff' Sipek diff --git a/common/qso-pack.c b/common/qso-pack.c --- a/common/qso-pack.c +++ b/common/qso-pack.c @@ -330,6 +330,9 @@ case VT_INT: return hlq_append_kv_int(buf, ns, key, val->i); case VT_BOOL: + /* bool type was introduced in version 1 */ + if (ver < 1) + return -EILSEQ; return hlq_append_kv_bool(buf, ns, key, val->b); case VT_STR: return hlq_append_kv_cstr(buf, ns, key, val_cstr(val));