diff options
| author | 2025-05-12 11:26:13 +0200 | |
|---|---|---|
| committer | 2025-05-12 11:27:35 +0200 | |
| commit | eee2e519e9ecccca038f93b6f8e5dd3c0082fe89 (patch) | |
| tree | fe6bb40843f202129706cd46e17215fc4e4fbf82 /src/plist.c | |
| parent | d031e94d7aee14c4e7646e67623c94e6164b99e3 (diff) | |
| download | libplist-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/plist.c')
| -rw-r--r-- | src/plist.c | 2 |
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) | |||
| 1548 | void plist_set_date_val(plist_t node, int32_t sec, int32_t usec) | 1548 | void 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 | ||
| 1554 | int plist_bool_val_is_true(plist_t boolnode) | 1554 | int plist_bool_val_is_true(plist_t boolnode) |
