Skip to content

Commit

Permalink
openarc: Avoid truncate ARC set headers
Browse files Browse the repository at this point in the history
As ARC set header may grow up to ARC_MAXHEADER, the limit size per
header size we determined to handle, buffer size to store should
be larger than it.

With this commit, fix a size of the buffer to store header field
body.

trusteddomainproject/OpenARC#180
  • Loading branch information
futatuki authored and flowerysong committed Oct 2, 2024
1 parent 9dc8658 commit 92d9ac8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openarc/openarc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3806,7 +3806,7 @@ mlfi_eom(SMFICTX *ctx)
size_t len;
u_char *hfvdest;
u_char hfname[BUFRSZ + 1];
u_char hfvalue[BUFRSZ + 1];
u_char hfvalue[ARC_MAXHEADER + 1];

memset(hfname, '\0', sizeof hfname);
strlcpy(hfname, arc_hdr_name(sealhdr, &len),
Expand Down

0 comments on commit 92d9ac8

Please sign in to comment.