Skip to content

Commit

Permalink
wcsnorm_compose_s: no memset overflow on error
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Feb 23, 2023
1 parent 9e99bc9 commit d587e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extwchar/wcsnorm_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ EXPORT errno_t _wcsnorm_compose_s_chk(wchar_t *restrict dest, rsize_t dmax,
if (destbos == BOS_UNKNOWN) {
if (unlikely(dmax > RSIZE_MAX_WSTR)) {
*lenp = 0;
handle_werror(dest, destbos / sizeof(wchar_t),
handle_werror(dest, RSIZE_MAX_WSTR,
"wcsnorm_compose_s: dmax exceeds max", ESLEMAX);
return ESLEMAX;
}
Expand Down

0 comments on commit d587e50

Please sign in to comment.