Skip to content

Commit

Permalink
sys/log/log_fcb: Fix buffer size for number of entries
Browse files Browse the repository at this point in the history
  • Loading branch information
vrahane committed Mar 20, 2024
1 parent 8b3340e commit d85ecc0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sys/log/full/src/log_fcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d85ecc0

Please sign in to comment.