summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2025-05-12 11:26:13 +0200
committerGravatar Nikias Bassen2025-05-12 11:27:35 +0200
commiteee2e519e9ecccca038f93b6f8e5dd3c0082fe89 (patch)
treefe6bb40843f202129706cd46e17215fc4e4fbf82 /src
parentd031e94d7aee14c4e7646e67623c94e6164b99e3 (diff)
downloadlibplist-eee2e519e9ecccca038f93b6f8e5dd3c0082fe89.tar.gz
libplist-eee2e519e9ecccca038f93b6f8e5dd3c0082fe89.tar.bz2
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!
Diffstat (limited to 'src')
-rw-r--r--src/plist.c2
1 files changed, 1 insertions, 1 deletions
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)
1548void plist_set_date_val(plist_t node, int32_t sec, int32_t usec) 1548void plist_set_date_val(plist_t node, int32_t sec, int32_t usec)
1549{ 1549{
1550 double val = (double)sec + (double)usec / 1000000; 1550 double val = (double)sec + (double)usec / 1000000;
1551 plist_set_element_val(node, PLIST_DATE, &val, sizeof(struct timeval)); 1551 plist_set_element_val(node, PLIST_DATE, &val, sizeof(double));
1552} 1552}
1553 1553
1554int plist_bool_val_is_true(plist_t boolnode) 1554int plist_bool_val_is_true(plist_t boolnode)