uudecoder: now are skipped all lines which follows line that starts with sum -r/size

This commit is contained in:
Ianos Gnatiuc 2006-09-09 10:08:56 +00:00
parent ac621880a6
commit 0fe38ad361
3 changed files with 35 additions and 20 deletions

View File

@ -10,6 +10,8 @@ _____________________________________________________________________________
‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/
_____________________________________________________________________________
- uudecoder: ⥯¥àì ¡ã¤¥â ¨£­®à¨à®¢ ­® ¢á¥ ¯®á«¥ áâப¨ çâ® ­ ç¨­ ¥âáï
­  "sum -r/size ".
- Win32: ˆá¯à ¢«¥­® ç á⮥ ç⥭¨¥ ॥áâà  ª®£¤  ¢ª«î祭 MCI §¢ãª.
- Golded+ ¬®£ 㯠áâì ¢ ᯨ᪥ á®®¡é¥­¨©, ¥á«¨ à §¬¥à ¨¬¥­¨ ¨«¨ ⥬ë ᫨誮¬
¡®«ì訥.

View File

@ -10,6 +10,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
- uudecoder: now are skipped all lines which follows line that starts
with "sum -r/size ".
- Win32: Fixed often registry reading when MCI sounds are enabled.
- Golded+ can crash in message list if size of name or subject is too big.

View File

@ -942,22 +942,32 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
*state = BEGIN;
}
while (!feof (datain) && *state != DONE &&
bool endsection = false;
while (!feof(datain) && (*state != DONE) &&
(ftell(datain)<maxpos || flags&FL_TOEND || maxpos==-1 ||
(!(flags&FL_PROPER) && uu_fast_scanning))) {
if (_FP_fgets (line, 299, datain) == NULL)
(!(flags&FL_PROPER) && uu_fast_scanning)))
{
if (_FP_fgets(line, 299, datain) == NULL)
break;
if (ferror (datain)) {
if (ferror (datain))
{
UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
uustring (S_SOURCE_READ_ERR),
strerror (uu_errno = errno));
return UURET_IOERR;
}
if (line[0]=='\015' || line[0]=='\012') { /* Empty line? */
if (*state == DATA &&
(method == UU_ENCODED || method == XX_ENCODED))
if ((method == UU_ENCODED) && !strncmp(line, "sum -r/size ", 12))
{
endsection = true;
}
if ((line[0] == '\015') || (line[0] == '\012'))
{
/* Empty line? */
if (*state == DATA && (method == UU_ENCODED || method == XX_ENCODED))
*state = END;
/*
@ -967,8 +977,7 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
* quite arbitrarly.
*/
if (vlc > 5)
tf = tc = 0;
if (vlc > 5) tf = tc = 0;
vlc = 0;
continue;
}
@ -1133,8 +1142,9 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
break;
}
if ((vflag = UUValidData (line, (tf)?method:0, &bhflag)) == 0)
vflag = UURepairData (datain, line, (tf)?method:0, &bhflag);
vflag = !endsection && UUValidData(line, tf ? method : 0, &bhflag);
if (!vflag)
vflag = !endsection && UURepairData(datain, line, tf ? method : 0, &bhflag);
/*
* correct XX/UUencoded lines that were declared Base64