Skip to content

Commit

Permalink
Merge pull request #280 from henrybear327/fix/#277
Browse files Browse the repository at this point in the history
Fix an error in memset's size argument.
  • Loading branch information
jserv authored Nov 27, 2023
2 parents 078f0ed + ac90b3f commit f1248cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ char *sanitize_path(const char *input)

/* starting from w till the end, we should mark it as \0 since that part of
* the buffer is not used */
memset(ret + w, '\0', sizeof(n + 1 - w));
memset(ret + w, '\0', n + 1 - w);

return ret;
}

0 comments on commit f1248cf

Please sign in to comment.