tags 584428 +patch forwarded 584428 https://rt.cpan.org/Public/Bug/Display.html?id=57253 thanks
This bug seems to be similar to upstream bug #57253 (accessing beyond the string in count_params). I've added the following note to that ticket with the attached patch: ======================================================================== It looks like there's a similar bug in parse_params to do with comments at the end of statements. It was reported to the Debian bug tracking system here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584428 Looking at the code in parse_params, it seems that the comment detection will only stop when it reaches a newline, and doesn't check for the end of the string. I guess you may have spotted and fixed this issue when fixing count_params, but it seems your git repository is missing the changes to dbdimp.c. I've attached a patch anyway which fixes parse_params. ======================================================================== Hopefully this should be fixed in the next upstream release. -- Chris Butler <chr...@debian.org> GnuPG Key ID: 4096R/49E3ACD3
>From 09e92001740136a4dc0b1ee92b7c5c0cd95c0caf Mon Sep 17 00:00:00 2001 From: Chris Butler <chr...@debian.org> Date: Sat, 5 Jun 2010 13:45:31 +0100 Subject: [PATCH] End comment detection at end of string This prevents an endless loop when a statement ends with a comment and no newline. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584428 for details. --- dbdimp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbdimp.c b/dbdimp.c index e473a77..aff25a6 100755 --- a/dbdimp.c +++ b/dbdimp.c @@ -595,12 +595,12 @@ static char *parse_params( *ptr++ = *statement_ptr++; if (*statement_ptr == '-') { - /* ignore everything until newline */ + /* ignore everything until newline or end of string */ while (*statement_ptr) { comment_length++; *ptr++ = *statement_ptr++; - if (*statement_ptr == '\n') + if (!*statement_ptr || *statement_ptr == '\n') { comment_end= true; break; -- 1.7.1