Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mail more protection from unset threads from RVP
details: https://anonhg.NetBSD.org/src/rev/909474dcdff6
branches: trunk
changeset: 1027727:909474dcdff6
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 17 13:14:54 2021 +0000
description:
more protection from unset threads from RVP
diffstat:
usr.bin/mail/thread.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 669c216cfa5e -r 909474dcdff6 usr.bin/mail/thread.c
--- a/usr.bin/mail/thread.c Fri Dec 17 11:06:15 2021 +0000
+++ b/usr.bin/mail/thread.c Fri Dec 17 13:14:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thread.c,v 1.12 2021/12/14 21:12:03 christos Exp $ */
+/* $NetBSD: thread.c,v 1.13 2021/12/17 13:14:54 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef __lint__
-__RCSID("$NetBSD: thread.c,v 1.12 2021/12/14 21:12:03 christos Exp $");
+__RCSID("$NetBSD: thread.c,v 1.13 2021/12/17 13:14:54 christos Exp $");
#endif /* not __lint__ */
#include <assert.h>
@@ -594,6 +594,8 @@
if (mp == NULL)
mp = current_thread.t_head;
+ if (mp == NULL)
+ return;
if (mp == NULL)
return NULL;
@@ -827,6 +829,9 @@
{
struct message *parent;
+ if (mcount == 0)
+ return;
+
parent = marray[0].mp->m_plink;
qsort(marray, mcount, sizeof(*marray), qsort_cmpfn);
link_array(marray, mcount);
Home |
Main Index |
Thread Index |
Old Index