mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Back out previous back out of previously correct code.
Double-plus-pointy-hat to: jmallett Submitted by: bde
This commit is contained in:
parent
9bd2f93ab4
commit
6bb72963c0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97978
@ -70,8 +70,7 @@ shquote(char **argv)
|
||||
if (buf == NULL) {
|
||||
if ((arg_max = sysconf(_SC_ARG_MAX)) == -1)
|
||||
errx(1, "sysconf _SC_ARG_MAX failed");
|
||||
if (arg_max >= LONG_MAX / 4 ||
|
||||
4 * (size_t)arg_max + 1 > SIZE_MAX)
|
||||
if (arg_max >= LONG_MAX / 4 || 4 * arg_max + 1 > SIZE_MAX)
|
||||
errx(1, "sysconf _SC_ARG_MAX preposterously large");
|
||||
buf_size = 4 * arg_max + 1;
|
||||
if ((buf = malloc(buf_size)) == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user