From eee2e519e9ecccca038f93b6f8e5dd3c0082fe89 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 12 May 2025 11:26:13 +0200 Subject: Fix plist_set_date_val to use correct size for data storage Otherwise the internal assertion will trigger since the incorrect size will be checked against. Thanks to @michaelwright235, @guyingzhao, and others for pointing this out! --- src/plist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plist.c b/src/plist.c index f0f0028..3f86105 100644 --- a/src/plist.c +++ b/src/plist.c @@ -1548,7 +1548,7 @@ void plist_set_data_val(plist_t node, const char *val, uint64_t length) void plist_set_date_val(plist_t node, int32_t sec, int32_t usec) { double val = (double)sec + (double)usec / 1000000; - plist_set_element_val(node, PLIST_DATE, &val, sizeof(struct timeval)); + plist_set_element_val(node, PLIST_DATE, &val, sizeof(double)); } int plist_bool_val_is_true(plist_t boolnode) -- cgit v1.1-32-gdbae