Re: [ovs-dev] [PATCH] ofp-actions: Assert variable actions have len>0.

2016-03-07 Thread Joe Stringer
On 7 March 2016 at 15:38, Ben Pfaff  wrote:
> On Mon, Mar 07, 2016 at 03:36:36PM -0800, Joe Stringer wrote:
>> Variable-length actions must have a nonzero length; if they don't,
>> something went wrong and we should bail out.
>>
>> Suggested-by: Ben Pfaff 
>> Signed-off-by: Joe Stringer 
>
> Acked-by: Ben Pfaff 

Thanks, applied.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH] ofp-actions: Assert variable actions have len>0.

2016-03-07 Thread Ben Pfaff
On Mon, Mar 07, 2016 at 03:36:36PM -0800, Joe Stringer wrote:
> Variable-length actions must have a nonzero length; if they don't,
> something went wrong and we should bail out.
> 
> Suggested-by: Ben Pfaff 
> Signed-off-by: Joe Stringer 

Acked-by: Ben Pfaff 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH] ofp-actions: Assert variable actions have len>0.

2016-03-07 Thread Joe Stringer
Variable-length actions must have a nonzero length; if they don't,
something went wrong and we should bail out.

Suggested-by: Ben Pfaff 
Signed-off-by: Joe Stringer 
---
 lib/ofp-actions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index a7c0388adeaa..e5fe8e608986 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -7407,7 +7407,7 @@ ofpact_finish(struct ofpbuf *ofpacts, struct ofpact 
*ofpact)
 
 ovs_assert(ofpact == ofpacts->header);
 len = (char *) ofpbuf_tail(ofpacts) - (char *) ofpact;
-ovs_assert(len <= UINT16_MAX);
+ovs_assert(len && len <= UINT16_MAX);
 ofpact->len = len;
 ofpbuf_padto(ofpacts, OFPACT_ALIGN(ofpacts->size));
 
-- 
2.1.4

___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev