diff options
author | 2004-06-09 18:16:05 +0000 | |
---|---|---|
committer | 2004-06-09 18:16:05 +0000 | |
commit | 2ddaa231da04daf4df4ea58e32877b84227b3ba3 (patch) | |
tree | e918d70a5f32524a8df276a6d0939995cf87567f /gnu/usr.bin/cvs/src/commit.c | |
parent | According to POSIX, _POSIX_PATH_MAX should be 256 but _POSIX_SYMLINK_MAX (diff) | |
download | wireguard-openbsd-2ddaa231da04daf4df4ea58e32877b84227b3ba3.tar.xz wireguard-openbsd-2ddaa231da04daf4df4ea58e32877b84227b3ba3.zip |
Several potential security problems found and fixed by Stefan Esser &
Sebastian Krahmer.
ok millert@
Diffstat (limited to 'gnu/usr.bin/cvs/src/commit.c')
-rw-r--r-- | gnu/usr.bin/cvs/src/commit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/usr.bin/cvs/src/commit.c b/gnu/usr.bin/cvs/src/commit.c index 149da7cb74d..0fe9f9425d7 100644 --- a/gnu/usr.bin/cvs/src/commit.c +++ b/gnu/usr.bin/cvs/src/commit.c @@ -472,7 +472,12 @@ commit (argc, argv) operate on, and only work with those files in the future. This saves time--we don't want to search the file system of the working directory twice. */ - find_args.argv = (char **) xmalloc (find_args.argc * sizeof (char **)); + if (size_overflow_p (xtimes (find_args.argc, sizeof (char **)))) + { + find_args.argc = 0; + return 0; + } + find_args.argv = xmalloc (xtimes (find_args.argc, sizeof (char **))); find_args.argc = 0; walklist (find_args.ulist, copy_ulist, &find_args); |