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

Bug#335615: Confirmed & patch.



  I just wrote a simple test program (attached) and it indeed exhibits
an infinite recursion.  The attached patch fixes it (in my test case,
it gets replaced by a crash because the queue is empty, but obviously
that's expected :) ).

  Daniel
#include <apt-pkg/acquire.h>

int main(int argc, char **argv)
{
  pkgAcquire aq;
  pkgAcquire::Queue q("Foo", &aq);
  pkgAcquire::UriIterator uit(&q);
  ++uit;

  return 0;
}
--- acquire.h.orig	2009-03-09 20:00:55.000000000 -0700
+++ acquire.h	2009-03-09 20:01:15.000000000 -0700
@@ -539,7 +539,7 @@
    
    public:
    
-   inline void operator ++() {operator ++();};
+   inline void operator ++() {operator ++(0);};
 
    void operator ++(int)
    {

Reply to: