tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bug in ipf/tools/ipfcomp.c



Hi -
I'm not using ipf myself, but clang has found an obvious bug
which might lead to an endless loop.
I think the appended patch fixes it, but I'll leave it to
someone who is familiar with the code to decide.
best regards
Matthias



------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
#
# old_revision [165c9a264e740246c6c35c346da57cf06f9cea43]
#
# patch "dist/ipf/tools/ipfcomp.c"
#  from [25eb73103d2444c35b6709be9b737c1809a014b1]
#    to [75e97da11c407cd68e0801e07b1a1388baf9985e]
#
============================================================
--- dist/ipf/tools/ipfcomp.c    25eb73103d2444c35b6709be9b737c1809a014b1
+++ dist/ipf/tools/ipfcomp.c    75e97da11c407cd68e0801e07b1a1388baf9985e
@@ -382,7 +382,7 @@ extern frentry_t *ipf_rules_out_%s[%d];\
 extern frentry_t *ipf_rules_out_%s[%d];\n",
                        grp->fg_name, grp->fg_name, outcount);
 
-               for (g = groups; g != g; g = g->fg_next)
+               for (g = groups; g != grp; g = g->fg_next)
                        if ((strncmp(g->fg_name, grp->fg_name,
                                     FR_GROUPLEN) == 0) &&
                            g->fg_flags == grp->fg_flags)


Home | Main Index | Thread Index | Old Index