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

View File

@ -10,6 +10,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ 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. - 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. - Golded+ can crash in message list if size of name or subject is too big.

View File

@ -942,33 +942,42 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
*state = BEGIN; *state = BEGIN;
} }
while (!feof (datain) && *state != DONE && bool endsection = false;
(ftell(datain)<maxpos || flags&FL_TOEND || maxpos==-1 ||
(!(flags&FL_PROPER) && uu_fast_scanning))) { while (!feof(datain) && (*state != DONE) &&
if (_FP_fgets (line, 299, datain) == NULL) (ftell(datain)<maxpos || flags&FL_TOEND || maxpos==-1 ||
(!(flags&FL_PROPER) && uu_fast_scanning)))
{
if (_FP_fgets(line, 299, datain) == NULL)
break; break;
if (ferror (datain)) { if (ferror (datain))
{
UUMessage (uunconc_id, __LINE__, UUMSG_ERROR, UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
uustring (S_SOURCE_READ_ERR), uustring (S_SOURCE_READ_ERR),
strerror (uu_errno = errno)); strerror (uu_errno = errno));
return UURET_IOERR; return UURET_IOERR;
} }
if (line[0]=='\015' || line[0]=='\012') { /* Empty line? */ if ((method == UU_ENCODED) && !strncmp(line, "sum -r/size ", 12))
if (*state == DATA && {
(method == UU_ENCODED || method == XX_ENCODED)) endsection = true;
*state = END; }
if ((line[0] == '\015') || (line[0] == '\012'))
{
/* Empty line? */
if (*state == DATA && (method == UU_ENCODED || method == XX_ENCODED))
*state = END;
/* /*
* if we had a whole block of valid lines before, we reset our * if we had a whole block of valid lines before, we reset our
* 'valid data' flag, tf. Without this 'if', we'd break decoding * 'valid data' flag, tf. Without this 'if', we'd break decoding
* files with interleaved blank lines. The value of 5 is chosen * files with interleaved blank lines. The value of 5 is chosen
* quite arbitrarly. * quite arbitrarly.
*/ */
if (vlc > 5) if (vlc > 5) tf = tc = 0;
tf = tc = 0;
vlc = 0; vlc = 0;
continue; continue;
} }
@ -1133,8 +1142,9 @@ UUDecodePart (FILE *datain, FILE *dataout, int *state,
break; break;
} }
if ((vflag = UUValidData (line, (tf)?method:0, &bhflag)) == 0) vflag = !endsection && UUValidData(line, tf ? method : 0, &bhflag);
vflag = UURepairData (datain, line, (tf)?method:0, &bhflag); if (!vflag)
vflag = !endsection && UURepairData(datain, line, tf ? method : 0, &bhflag);
/* /*
* correct XX/UUencoded lines that were declared Base64 * correct XX/UUencoded lines that were declared Base64