strcpy(encoding, "");
if (!strcasecmp(encoding, "binary"))
strcpy(encoding, "");
+ if (!strcasecmp(encoding, "ISO-8859-1"))
+ strcpy(encoding, "");
/* If this part is not encoded, send as-is */
if ( (strlen(encoding) == 0) || (dont_decode)) {
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))
{
if (next_boundary != NULL) {
/* If we pass out of scope, don't attempt to
* read past the end boundary. */
- if ((*(next_boundary + m->b[startary].len + 1) == '-') &&
- (*(next_boundary + m->b[startary].len + 2) == '-') ){
+ if ((*(next_boundary + m->b[startary].len) == '-') &&
+ (*(next_boundary + m->b[startary].len + 1) == '-') ){
ptr = content_end;
}
else {