From 400943886c93881c8989c8bf6123059d48d44b93 Mon Sep 17 00:00:00 2001 From: Charlie Gordon Date: Sun, 3 Mar 2024 11:51:22 +0100 Subject: [PATCH] fix UB on dbuf_put --- cutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cutils.c b/cutils.c index b4960f9cb..c0aacef69 100644 --- a/cutils.c +++ b/cutils.c @@ -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; }