Changeset 439 for trunk/dll/autoview.c


Ignore:
Timestamp:
Aug 24, 2006, 6:45:27 AM (19 years ago)
Author:
root
Message:

Use Runtime_Error more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/autoview.c

    r377 r439  
    1515  29 May 06 SHL Sync with archiver.bb2 mods
    1616  22 Jul 06 SHL Check more run time errors
     17  15 Aug 06 SHL Use Runtime_Error more
    1718
    1819***********************************************************************/
     
    216217}
    217218
     219static PSZ pszBufOvfMsg = "Buffer overflow";
    218220
    219221ULONG CreateHexDump (CHAR *pchInBuf,ULONG cbInBuf,
     
    232234    while (ibIn < cbInBuf) {
    233235      if (pchOut - pchOutBuf + cbOutLine >= cbOutBuf) {
    234         saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"hex buf ovf");
     236        Runtime_Error(pszSrcFile, __LINE__, pszBufOvfMsg);
    235237        break;
    236238      }
     
    403405                        *dest = 0;
    404406                        if (dest - obuff >= obufflen)
    405                           saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"obuff ovf");
     407                          Runtime_Error(pszSrcFile, __LINE__, pszBufOvfMsg);
    406408                      }
    407409                      if(*obuff)
     
    503505                  } // while
    504506                  if (p - buff >= bufflen)
    505                     saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"buff ovf");
     507                    Runtime_Error(pszSrcFile, __LINE__, pszBufOvfMsg);
    506508                  if(*buff)
    507509                    WinSetWindowText(hwndAutoview,buff);
     
    586588                        } // while
    587589                        if (p - buff >= 65536) {
    588                           saymsg(MB_ENTER,HWND_DESKTOP,DEBUG_STRING,"eabuff ovf");
     590                          Runtime_Error(pszSrcFile, __LINE__, pszBufOvfMsg);
    589591                          buff[65535] = 0;      // Try to stay alive
    590592                          break;
     
    687689          if (_beginthread(MakeAutoWin,NULL,65536,(PVOID)hwnd) == -1) {
    688690            Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT));
    689             PostMsg(hwnd,
    690                     UM_CLOSE,
    691                     MPVOID,
    692                     MPVOID);
     691            PostMsg(hwnd,UM_CLOSE,MPVOID,MPVOID);
    693692          }
    694693        }
Note: See TracChangeset for help on using the changeset viewer.