From 6c8ac2cf1e8a867e29f648eef39804076d7780b9 Mon Sep 17 00:00:00 2001 From: dgsga <181612+dgsga@users.noreply.github.com> Date: Wed, 26 Jun 2024 08:49:54 +0100 Subject: [PATCH] Fix buffer overflow warning in etc/cnid_dbd/cmd_dbd_scanvol.c --- etc/cnid_dbd/cmd_dbd_scanvol.c | 3 +-- libatalk/compat/rquota_xdr.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/etc/cnid_dbd/cmd_dbd_scanvol.c b/etc/cnid_dbd/cmd_dbd_scanvol.c index 20f7048363..39c7053a0c 100644 --- a/etc/cnid_dbd/cmd_dbd_scanvol.c +++ b/etc/cnid_dbd/cmd_dbd_scanvol.c @@ -430,8 +430,7 @@ static int check_eafile_in_adouble(const char *name) /* Get string before "::EA" from EA filename */ namep[0] = 0; - strlcpy(pname + 3, namedup, sizeof(pname)); /* Prepends "../" */ - + strlcpy(pname + 3, namedup, sizeof(pname) - 3); /* Prepends "../" */ if ((access( pname, F_OK)) == 0) { ret = 1; goto ea_check_done; diff --git a/libatalk/compat/rquota_xdr.c b/libatalk/compat/rquota_xdr.c index 99f3f66c0c..27ca093be0 100644 --- a/libatalk/compat/rquota_xdr.c +++ b/libatalk/compat/rquota_xdr.c @@ -80,7 +80,7 @@ bool_t xdr_rquota(XDR *xdrs, rquota *objp) #if defined(HAVE_RQUOTA_H_QR_STATUS) bool_t xdr_gqr_status(XDR *xdrs, qr_status *objp) #else -xdr_gqr_status(XDR *xdrs, gqr_status *objp) +bool_t xdr_gqr_status(XDR *xdrs, gqr_status *objp) #endif { if (!xdr_enum(xdrs, (enum_t *)objp)) {