[RFC 36/40] P2P: keep track of secondary device types

Johannes Berg johannes
Thu Mar 17 02:53:53 PDT 2011


On Thu, 2011-03-17 at 11:47 +0200, Jouni Malinen wrote:
> On Wed, Jan 05, 2011 at 08:53:32PM +0100, Johannes Berg wrote:
> > diff --git a/src/wps/wps_attr_parse.c b/src/wps/wps_attr_parse.c
> > @@ -512,6 +512,15 @@ static int wps_set_attr(struct wps_parse_attr *attr, u16 type,
> > +	case ATTR_SECONDARY_DEV_TYPE_LIST:
> > +		if ((len > WPS_SEC_DEV_TYPE_LEN) && !(len % WPS_DEV_TYPE_LEN)) {
> > +			wpa_printf(MSG_DEBUG, "WPS: Invalid Secondary Device "
> > +				   "Type length %u", len);
> 
> That error conditions looks quite odd.. I would assume this was supposed
> to be too long OR not divisible by WPS_DEV_TYPE_LEN. I fixed that and
> committed the patch.

Indeed, that seems right, thanks. I guess nobody ever tested to hit
it :)

johannes




More information about the Hostap mailing list