diff options
author | ache <ache@FreeBSD.org> | 1998-06-30 14:44:00 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-06-30 14:44:00 +0800 |
commit | 60766db13b0251b21a2b276b46a034f06c71de5e (patch) | |
tree | a8148aa214ff03f772c1c304f7c17d7c5344f2c3 /mail | |
parent | 04bbd53b2d2da9e7ec57bb24f699bb589c79d5ed (diff) | |
download | freebsd-ports-gnome-60766db13b0251b21a2b276b46a034f06c71de5e.tar.gz freebsd-ports-gnome-60766db13b0251b21a2b276b46a034f06c71de5e.tar.zst freebsd-ports-gnome-60766db13b0251b21a2b276b46a034f06c71de5e.zip |
Fix another place with UIDL check too
Calculate UIDL size and lines number properly now
Diffstat (limited to 'mail')
-rw-r--r-- | mail/popper/files/patch-ai | 124 |
1 files changed, 117 insertions, 7 deletions
diff --git a/mail/popper/files/patch-ai b/mail/popper/files/patch-ai index 86c7c92c4e70..965ad3075cf2 100644 --- a/mail/popper/files/patch-ai +++ b/mail/popper/files/patch-ai @@ -1,7 +1,28 @@ -*** pop_dropcopy.c.orig Sun Jun 28 21:46:27 1998 ---- pop_dropcopy.c Mon Jun 29 01:05:25 1998 +*** pop_dropcopy.c.orig Tue Jun 30 10:27:00 1998 +--- pop_dropcopy.c Tue Jun 30 10:27:04 1998 *************** -*** 484,495 **** +*** 463,470 **** + *cp++ = '\n'; + *cp = '\0'; + +! mp->length += strlen("X-UIDL: ") + strlen(mp->uidl_str) + 1; +! p->drop_size += strlen("X-UIDL: ") + strlen(mp->uidl_str)+1; + + /* New UIDs do not dirty the mailspool if NO_STATUS is set. They + are just recalculated each time the popper is run or LMOS is +--- 463,472 ---- + *cp++ = '\n'; + *cp = '\0'; + +! i = strlen("X-UIDL: ") + (DIG_SIZE * 2) + 2; +! mp->length += i; +! p->drop_size += i; +! mp->lines++; + + /* New UIDs do not dirty the mailspool if NO_STATUS is set. They + are just recalculated each time the popper is run or LMOS is +*************** +*** 488,506 **** } else if (!strncasecmp("X-UIDL:", buffer, 7)) { if (!uidl_found) { char *cp; @@ -14,18 +35,107 @@ { uidl_found--; /*roll over as though it hasn't seen anything*/ continue; ---- 484,497 ---- + } + mp->uidl_str = (char *)strdup(cp); +! mp->length += nchar + 1; +! p->drop_size += nchar + 1; + } + continue; /* Do not include this value in the message size */ + } else if ((strncasecmp(buffer,"Status:",7) == 0)) { +--- 490,514 ---- } else if (!strncasecmp("X-UIDL:", buffer, 7)) { if (!uidl_found) { char *cp; -+ int l; ++ int i; uidl_found++; /* Skip over header string */ cp = &buffer[7]; while (*cp && (*cp == ' ' || *cp == '\t')) cp++; -! l = strlen(cp); -! if(l < DIG_SIZE || l > 70/*rfc1939*/+1) /* To account for the empty UIDL string */ +! i = strlen(cp); +! /* UIDLs: >=DIG_SIZE-1 (pop_bull.c), DIG_SIZE*2 */ +! if (i < DIG_SIZE || i > (DIG_SIZE * 2) + 1) + { + uidl_found--; /*roll over as though it hasn't seen anything*/ + continue; + } ++ + mp->uidl_str = (char *)strdup(cp); +! i += strlen("X-UIDL: ") + 1; +! mp->length += i; +! p->drop_size += i; +! mp->lines++; + } + continue; /* Do not include this value in the message size */ + } else if ((strncasecmp(buffer,"Status:",7) == 0)) { +*************** +*** 711,718 **** + *cp++ = '\n'; + *cp = '\0'; + +! mp->length += strlen("X-UIDL: ") + strlen(mp->uidl_str) + 1; +! p->drop_size += strlen("X-UIDL: ") + strlen(mp->uidl_str)+1; + + /* New UIDs do not dirty the mailspool if NO_STATUS is set. They + are just recalculated each time the popper is run or LMOS is +--- 719,728 ---- + *cp++ = '\n'; + *cp = '\0'; + +! i = strlen("X-UIDL: ") + (DIG_SIZE * 2) + 2; +! mp->length += i; +! p->drop_size += i; +! mp->lines++; + + /* New UIDs do not dirty the mailspool if NO_STATUS is set. They + are just recalculated each time the popper is run or LMOS is +*************** +*** 737,757 **** + } else if (!strncasecmp("X-UIDL:", buffer, 7)) { + if (!uidl_found) { + char *cp; + + uidl_found++; + + /* Skip over header */ + cp = &buffer[7]; + while (*cp && (*cp == ' ' || *cp == '\t')) cp++; +! if(strlen(cp) < DIG_SIZE) /* To account for the empty UIDL string */ + { + uidl_found--; /*roll over as though it hasn't seen anything*/ + continue; + } + + mp->uidl_str = (char *)strdup(cp); +! mp->length += nchar + 1; +! p->drop_size += nchar + 1; + } + continue; /* Do not include this value in the message size */ + } else if (!strncasecmp(buffer,"Status:",7)) { +--- 747,772 ---- + } else if (!strncasecmp("X-UIDL:", buffer, 7)) { + if (!uidl_found) { + char *cp; ++ int i; + + uidl_found++; + + /* Skip over header */ + cp = &buffer[7]; + while (*cp && (*cp == ' ' || *cp == '\t')) cp++; +! i = strlen(cp); +! /* UIDLs: >=DIG_SIZE-1 (pop_bull.c), DIG_SIZE*2 */ +! if (i < DIG_SIZE || i > (DIG_SIZE * 2) + 1) { uidl_found--; /*roll over as though it hasn't seen anything*/ continue; + } + + mp->uidl_str = (char *)strdup(cp); +! i += strlen("X-UIDL: ") + 1; +! mp->length += i; +! p->drop_size += i; +! mp->lines++; + } + continue; /* Do not include this value in the message size */ + } else if (!strncasecmp(buffer,"Status:",7)) { |