]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sbin/ipfw: Fix null pointer deference when printing counters
authorLutz Donnerhacke <donner@FreeBSD.org>
Fri, 30 Apr 2021 14:12:47 +0000 (16:12 +0200)
committerLutz Donnerhacke <donner@FreeBSD.org>
Sun, 2 May 2021 19:28:46 +0000 (21:28 +0200)
commitbf7cc0f9cb6603a6bdd6131c8d1939724ce6e62d
tree627a105135358381463af8b2f9d0a4ac2a661599
parentf6b6d216cafb154a85313a2d1bd34b18b9bfbba8
sbin/ipfw: Fix null pointer deference when printing counters

ipfw -[tT] prints statistics of the last access. If the rule was never
used, the counter might be not exist.  This happens unconditionally on
inserting a new rule.  Avoid printing statistics in this case.

PR: 255491
Reported by: Haisheng Zhouz
Reviewed by: ae
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30046
sbin/ipfw/ipfw2.c