From 57919c6b448cc53c5bc66bc23d8ef8ac07aadd3d Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 14 Apr 2006 23:45:43 +0000 Subject: [PATCH] Coverity CID 1117: Prevent NULL deref. --- sys/netccitt/llc_input.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/netccitt/llc_input.c b/sys/netccitt/llc_input.c index 91fa152e65ea..47d50ce9702c 100644 --- a/sys/netccitt/llc_input.c +++ b/sys/netccitt/llc_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: llc_input.c,v 1.17 2006/04/14 23:43:07 christos Exp $ */ +/* $NetBSD: llc_input.c,v 1.18 2006/04/14 23:45:43 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: llc_input.c,v 1.17 2006/04/14 23:43:07 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: llc_input.c,v 1.18 2006/04/14 23:45:43 christos Exp $"); #include #include @@ -268,7 +268,8 @@ llcintr() frame->llc_window = linkp->llcl_window; else frame->llc_window = sapinfo->si_window; frame->llc_fid = 9; /* XXX */ - frame->llc_class = sapinfo->si_class; + frame->llc_class = + sapinfo ? sapinfo->si_class : 1 frame->llc_ssap = frame->llc_dsap; } else { frame->llc_window = 0;