Safer "bug" report 750338
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2618 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a725cdf3c4
commit
a798cabcff
4 changed files with 19 additions and 6 deletions
|
@ -15,7 +15,20 @@
|
|||
#include <cderr.h>
|
||||
#include "resource.h"
|
||||
|
||||
#define popstring dontuseme
|
||||
#include "../exdll/exdll.h"
|
||||
#undef popstring
|
||||
|
||||
static int popstring(char *str)
|
||||
{
|
||||
stack_t *th;
|
||||
if (!g_stacktop || !*g_stacktop) return 1;
|
||||
th=(*g_stacktop);
|
||||
if (str) lstrcpy(str,th->text);
|
||||
*g_stacktop = th->next;
|
||||
GlobalFree((HGLOBAL)th);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define strcpy(x,y) lstrcpy(x,y)
|
||||
#define strncpy(x,y,z) lstrcpyn(x,y,z)
|
||||
|
@ -32,7 +45,6 @@ char *STRDUP(const char *c)
|
|||
return lstrcpy(t,c);
|
||||
}
|
||||
|
||||
|
||||
#define FIELD_LABEL (1)
|
||||
#define FIELD_ICON (2)
|
||||
#define FIELD_BITMAP (3)
|
||||
|
|
Binary file not shown.
|
@ -1042,8 +1042,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
tv.hInsertAfter=TVI_LAST;
|
||||
tv.item.mask=TVIF_PARAM|TVIF_TEXT|TVIF_STATE;
|
||||
tv.item.lParam=x;
|
||||
process_string_fromtab(0,sec->name_ptr);
|
||||
tv.item.pszText=ps_tmpbuf;
|
||||
tv.item.pszText=process_string_fromtab(0,sec->name_ptr);
|
||||
tv.item.stateMask=TVIS_STATEIMAGEMASK|TVIS_EXPANDED;
|
||||
|
||||
{
|
||||
|
@ -1098,8 +1097,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
if (tv.hItem=hTreeItems[x])
|
||||
{
|
||||
tv.mask=TVIF_TEXT;
|
||||
process_string_fromtab(0,ns);
|
||||
tv.pszText=ps_tmpbuf;
|
||||
tv.pszText=process_string_fromtab(0,ns);
|
||||
TreeView_SetItem(hwndTree1,&tv);
|
||||
}
|
||||
}
|
||||
|
@ -1421,6 +1419,7 @@ static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||
if (!(inst_flags&CH_FLAGS_DETAILS_NEVERSHOW)) ShowWindow(insthwnd,SW_SHOWNA);
|
||||
else insthwndbutton=NULL;
|
||||
}
|
||||
progress_bar_pos=0;
|
||||
progress_bar_len=num;
|
||||
|
||||
g_progresswnd=GetUIItem(IDC_PROGRESS);
|
||||
|
|
|
@ -329,7 +329,9 @@ char ps_tmpbuf[NSIS_MAX_STRLEN*2];
|
|||
|
||||
char * NSISCALL process_string_fromtab(char *out, int offs)
|
||||
{
|
||||
return lstrcpyn(out,process_string(GetStringFromStringTab(offs)),NSIS_MAX_STRLEN);
|
||||
char *p=process_string(GetStringFromStringTab(offs));
|
||||
if (!out) return p;
|
||||
return lstrcpyn(out,p,NSIS_MAX_STRLEN);
|
||||
}
|
||||
|
||||
void NSISCALL myitoa(char *s, int d) { wsprintf(s,"%d",d); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue