2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

No need to cast malloc() return value.

This commit is contained in:
Todd C. Miller
2015-05-14 10:47:09 -06:00
parent c75eb5bf0d
commit cbcaaa299a
7 changed files with 10 additions and 11 deletions

View File

@@ -236,7 +236,7 @@ main(int argc, char *argv[])
for (size = 0, from = argv; *from; from++)
size += strlen(*from) + 1;
user_args = (char *) sudo_emalloc(size);
user_args = sudo_emalloc(size);
for (to = user_args, from = argv; *from; from++) {
n = strlcpy(to, *from, size - (to - user_args));
if (n >= size - (to - user_args))