From 2ddaa231da04daf4df4ea58e32877b84227b3ba3 Mon Sep 17 00:00:00 2001 From: otto Date: Wed, 9 Jun 2004 18:16:05 +0000 Subject: Several potential security problems found and fixed by Stefan Esser & Sebastian Krahmer. ok millert@ --- gnu/usr.bin/cvs/src/commit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/usr.bin/cvs/src/commit.c') 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); -- cgit v1.2.3-59-g8ed1b