Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mail PR/47098: Steffen "Daode" Nurpmeso: mail(1): SE...
details: https://anonhg.NetBSD.org/src/rev/3e35cc3a0bfc
branches: trunk
changeset: 782211:3e35cc3a0bfc
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 21 01:11:23 2012 +0000
description:
PR/47098: Steffen "Daode" Nurpmeso: mail(1): SEGV with bad globbed file argument
diffstat:
usr.bin/mail/names.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 4a5cd214059f -r 3e35cc3a0bfc usr.bin/mail/names.c
--- a/usr.bin/mail/names.c Sun Oct 21 01:10:22 2012 +0000
+++ b/usr.bin/mail/names.c Sun Oct 21 01:11:23 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: names.c,v 1.29 2012/04/29 23:50:22 christos Exp $ */
+/* $NetBSD: names.c,v 1.30 2012/10/21 01:11:23 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)names.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: names.c,v 1.29 2012/04/29 23:50:22 christos Exp $");
+__RCSID("$NetBSD: names.c,v 1.30 2012/10/21 01:11:23 christos Exp $");
#endif
#endif /* not lint */
@@ -266,8 +266,16 @@
ispipe = np->n_name[0] == '|';
if (ispipe)
fname = np->n_name+1;
- else
+ else {
fname = expand(np->n_name);
+ if (fname == NULL) {
+ warnx("Filename expansion of %s failed",
+ np->n_name);
+ senderr++;
+ goto cant;
+ }
+ }
+
/*
* See if we have copied the complete message out yet.
Home |
Main Index |
Thread Index |
Old Index