NetLabel: correct CIPSO tag handling when adding new DOI definitions
authorPaul Moore <paul.moore@hp.com>
Fri, 5 Jan 2007 20:08:22 +0000 (15:08 -0500)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 9 Jan 2007 08:30:01 +0000 (00:30 -0800)
commit2a2f11c227bdf292b3a2900ad04139d301b56ac4
treee94ced56b21fa9258dc6d8c9d8b1e1a3f6e190a1
parent797951200679f1d5ea12a2e58cc7bdbc2848764c
NetLabel: correct CIPSO tag handling when adding new DOI definitions

The current netlbl_cipsov4_add_common() function has two problems which are
fixed with this patch.  The first is an off-by-one bug where it is possibile to
overflow the doi_def->tags[] array.  The second is a bug where the same
doi_def->tags[] array was not always fully initialized, which caused sporadic
failures.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
net/netlabel/netlabel_cipso_v4.c