madhuneal / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

intlist.c appending to tail is broken. #129

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an ACL with dst_as or similar with multiple AS entries, such as
   acl foo dst_as 123 456 789
2. Reload squid
3. perform 'squiclient: mgr:config| grep foo'
4. Only the first integer is dumped e.g. 'acl foo dst_as 123'

What is the expected output? What do you see instead?

expected:
acl foo dst_as 123
acl foo dst_as 456
acl foo dst_as 789

proposed patch to intlist.c to actually append to the tail of the intlist :

Index: libmem/intlist.c
===================================================================
--- libmem/intlist.c    (revision 6072)
+++ libmem/intlist.c    (working copy)
@@ -89,7 +89,7 @@
 {
     intlist *t, *n;

-    for (t = list; t; t = t->next)
+       for (t = list; t && t->next; t = t->next)
         ;

     intlistCheckAlloc();

Original issue reported on code.google.com by roelf.di...@gmail.com on 3 Nov 2010 at 4:45

GoogleCodeExporter commented 8 years ago
Fixed in r14817

Original comment by roelf.di...@gmail.com on 3 Nov 2010 at 4:52