Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 Avoid null pointer exception hpcmips/mip...
details: https://anonhg.NetBSD.org/src/rev/b37a19c69854
branches: trunk
changeset: 1024705:b37a19c69854
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 31 16:42:16 2021 +0000
description:
Avoid null pointer exception hpcmips/mipsel src/lib/libperfuse/ops.c
diffstat:
usr.bin/xlint/lint1/tree.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 2658958094cd -r b37a19c69854 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Sun Oct 31 16:29:18 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c Sun Oct 31 16:42:16 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.386 2021/10/30 22:04:42 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.387 2021/10/31 16:42:16 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.386 2021/10/30 22:04:42 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.387 2021/10/31 16:42:16 christos Exp $");
#endif
#include <float.h>
@@ -1793,6 +1793,9 @@
return;
if (rn->tn_left->tn_type->t_tspec != ENUM)
return;
+ // XXX: why?
+ if (rn->tn_type->t_enum == NULL)
+ return;
max_enum_value = INT_MIN;
ec = rn->tn_type->t_enum->en_first_enumerator;
Home |
Main Index |
Thread Index |
Old Index