Changeset 250


Ignore:
Timestamp:
Aug 16, 2005, 5:12:10 PM (20 years ago)
Author:
root
Message:

rewrite_archiverbb2: avoid dereferencing null signature
ArcReviewDlgProc: ensure signature allocated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/avv.c

    r199 r250  
    1515  01 Aug 04 SHL Rework fixup usage
    1616  06 Jun 05 SHL Drop unused
     17  14 Aug 05 SHL rewrite_archiverbb2: avoid dereferencing null signature
     18  14 Aug 05 SHL ArcReviewDlgProc: ensure signature allocated
    1719
    1820***********************************************************************/
     
    2022#define INCL_DOS
    2123#define INCL_WIN
    22 
    2324#include <os2.h>
     25
    2426#include <stdlib.h>
    2527#include <stdio.h>
     
    2830#include <ctype.h>
    2931#include <time.h>
     32
    3033#include "fm3dll.h"
    3134#include "fm3dlg.h"
     
    222225  INT         counter = 0;
    223226  ARC_TYPE    *info;
    224   static CHAR s[258];
     227  CHAR        s[258];
    225228  CHAR        *p;
    226229
     
    289292                    s,
    290293                    sizeof(s),
    291                     strlen(info->signature)),
     294                    info->signature ? strlen(info->signature) : 0),
    292295              nonull(info->startlist),
    293296              nonull(info->endlist),
     
    410413
    411414
    412 MRESULT EXPENTRY ArcReviewDlgProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2)
     415MRESULT EXPENTRY ArcReviewDlgProc(HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2)
    413416{
    414417  ARCDUMP       *admp;
     
    873876          admp->info->exwdirs = xstrdup_from_window(hwnd,AD_WDIRS,admp->info->exwdirs);
    874877          admp->info->ext = xstrdup_from_window(hwnd,AD_EXT,admp->info->ext);
    875           literal(xstrdup_from_window(hwnd,
    876                                        AD_SIG,
    877                                        admp->info->signature));
     878          admp->info->signature = xstrdup_from_window(hwnd,
     879                                                      AD_SIG,
     880                                                      admp->info->signature);
     881          literal(admp->info->signature);
    878882          admp->info->list = xstrdup_from_window(hwnd,
    879883                                                  AD_LIST,
Note: See TracChangeset for help on using the changeset viewer.