svn commit: r245498 - projects/diffused_head/sbin/ipfw/diffuse_collector
Lawrence Stewart
lstewart at FreeBSD.org
Wed Jan 16 07:19:24 UTC 2013
Author: lstewart
Date: Wed Jan 16 07:19:23 2013
New Revision: 245498
URL: http://svnweb.freebsd.org/changeset/base/245498
Log:
The template offset is not required when parsing an individual rule and was
being used uninitalised which is a bug. Remove the variable.
Reported by: clang
Modified:
projects/diffused_head/sbin/ipfw/diffuse_collector/diffuse_collector.c
Modified: projects/diffused_head/sbin/ipfw/diffuse_collector/diffuse_collector.c
==============================================================================
--- projects/diffused_head/sbin/ipfw/diffuse_collector/diffuse_collector.c Wed Jan 16 06:12:19 2013 (r245497)
+++ projects/diffused_head/sbin/ipfw/diffuse_collector/diffuse_collector.c Wed Jan 16 07:19:23 2013 (r245498)
@@ -854,7 +854,7 @@ parse_rule(struct class_node *cnode, str
{
struct flow_class *c;
struct rule_entry *n, *prev, *r;
- int dlen, i, offs, toffs, type;
+ int dlen, i, offs, type;
offs = 0;
type = -1;
@@ -878,7 +878,7 @@ parse_rule(struct class_node *cnode, str
switch(t->fields[i].idx) {
case DIP_IE_CLASSES:
- while (offs - toffs < dlen - 1) {
+ while (offs < dlen - 1) {
c = (struct flow_class *)malloc(
sizeof(struct flow_class));
if (c == NULL)
More information about the svn-src-projects
mailing list