Skip to content

Commit

Permalink
Fix buffer overflow warning in etc/cnid_dbd/cmd_dbd_scanvol.c
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsga authored and rdmark committed Jul 20, 2024
1 parent a34ae49 commit 6c8ac2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions etc/cnid_dbd/cmd_dbd_scanvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libatalk/compat/rquota_xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 6c8ac2c

Please sign in to comment.