summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_lsa.c
diff options
context:
space:
mode:
authorpaul <paul>2006-05-12 23:11:14 +0000
committerpaul <paul>2006-05-12 23:11:14 +0000
commitf885018b6b16e9e8eb840fb5693c14dce9d1355f (patch)
tree4341beee762a984e2ded080eb6289e0bf1eacd54 /ospfd/ospf_lsa.c
parentf4b0be699e30b8b90f71db0c3e590c6471f2d72f (diff)
downloadquagga-f885018b6b16e9e8eb840fb5693c14dce9d1355f.tar.bz2
quagga-f885018b6b16e9e8eb840fb5693c14dce9d1355f.tar.xz
[ospfd] CID #13, debug for NULL type7 LSA should not print out data from it
2006-05-12 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_translated_nssa_refresh) Add non-assert sanity check, in case DEBUG isn't defined. Debug message when no type7 exists should print the ID from the type5, not the type7, fixes CID #13.
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r--ospfd/ospf_lsa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 9ef5a6ae..d2f593e5 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -2002,6 +2002,8 @@ ospf_translated_nssa_refresh (struct ospf *ospf, struct ospf_lsa *type7,
/* Sanity checks. */
assert (type7 || type5);
+ if (!type7 || !type5)
+ return NULL;
if (type7)
assert (type7->data);
if (type5)
@@ -2055,7 +2057,7 @@ ospf_translated_nssa_refresh (struct ospf *ospf, struct ospf_lsa *type7,
if (IS_DEBUG_OSPF_NSSA)
zlog_debug ("ospf_translated_nssa_refresh(): no Type-7 found for "
"Type-5 LSA Id %s",
- inet_ntoa (type7->data->id));
+ inet_ntoa (type5->data->id));
return NULL;
}