Skip to content

Commit

Permalink
fix UB on dbuf_put
Browse files Browse the repository at this point in the history
  • Loading branch information
chqrlie committed Mar 3, 2024
1 parent 610b4c9 commit 4009438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int dbuf_put(DynBuf *s, const uint8_t *data, size_t len)
if (dbuf_realloc(s, s->size + len))
return -1;
}
memcpy(s->buf + s->size, data, len);
memcpy_no_ub(s->buf + s->size, data, len);
s->size += len;
return 0;
}
Expand Down

0 comments on commit 4009438

Please sign in to comment.