This is an automated email from the ASF dual-hosted git repository. vipulrahane pushed a commit to branch vipul/logging_num_entries in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit d85ecc06326219708a890e5bd027b07ba7f07add Author: Vipul Rahane <[email protected]> AuthorDate: Wed Mar 20 12:00:45 2024 -0700 sys/log/log_fcb: Fix buffer size for number of entries --- sys/log/full/src/log_fcb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/log/full/src/log_fcb.c b/sys/log/full/src/log_fcb.c index b681665c0..e89e2d0de 100644 --- a/sys/log/full/src/log_fcb.c +++ b/sys/log/full/src/log_fcb.c @@ -862,8 +862,13 @@ log_fcb_copy_entry(struct log *log, struct fcb_entry *entry, struct fcb *dst_fcb) { struct log_entry_hdr ueh; +#if MYNEWT_VAL(LOG_FLAGS_NUM_ENTRIES) + char data[MYNEWT_VAL(LOG_FCB_COPY_MAX_ENTRY_LEN) + LOG_BASE_ENTRY_HDR_SIZE + + LOG_IMG_HASHLEN + LOG_NUM_ENTRIES_SIZE]; +#else char data[MYNEWT_VAL(LOG_FCB_COPY_MAX_ENTRY_LEN) + LOG_BASE_ENTRY_HDR_SIZE + LOG_IMG_HASHLEN]; +#endif uint16_t hdr_len; int dlen; int rc;
