Date: Wed, 16 Jan 2013 07:19:24 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r245498 - projects/diffused_head/sbin/ipfw/diffuse_collector Message-ID: <201301160719.r0G7JO2T027219@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301160719.r0G7JO2T027219>