Mimeparser Bugfix
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 12 Dec 2010 14:47:14 +0000 (15:47 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 12 Dec 2010 14:47:14 +0000 (15:47 +0100)
 - use the right pointer to calculate the terminal border of the first memchr

libcitadel/lib/mime_parser.c

index 24b76477975128251fcfffb8386da929487c14ff..b4c61a59622d6f0610dd42f822fe179042ef19e3 100644 (file)
@@ -543,7 +543,7 @@ static char *FindNextContent(char *ptr,
                
 
                srch = next_boundary = NULL;
-               for (srch = memchr(ptr, '-',  content_end - srch);
+               for (srch = memchr(ptr, '-',  content_end - ptr);
                     (srch != NULL) && (srch < content_end); 
                     srch = memchr(srch, '-',  content_end - srch)) 
                {