From dde948a0a60ccd5d17889d51904727a2a16e0a1f Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 8 Dec 2005 16:02:57 +0000 Subject: Missing ntohs() in error path. Found via regress test. --- usr.sbin/bgpd/rde.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index d5a6335ed9e..365b2de26bc 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.181 2005/11/30 13:45:19 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.182 2005/12/08 16:02:56 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -1151,6 +1151,7 @@ rde_attr_error(u_char *p, u_int16_t len, struct rde_aspath *attr, if (len - plen < 2) return (op); UPD_READ(&attr_len, p, plen, 2); + attr_len = ntohs(attr_len); } else { UPD_READ(&tmp8, p, plen, 1); attr_len = tmp8; -- cgit v1.2.3