diff -u nsis-2.37/debian/changelog nsis-2.37/debian/changelog --- nsis-2.37/debian/changelog +++ nsis-2.37/debian/changelog @@ -1,3 +1,9 @@ +nsis (2.37-3) unstable; urgency=low + + * Add nsDialogs stack corruption fix from nsis 2.38 + + -- Paul Wise Mon, 01 Sep 2008 07:20:44 +0800 + nsis (2.37-2) unstable; urgency=medium * Ensure the package will FTBFS when makensis is not built diff -u nsis-2.37/debian/patches/series nsis-2.37/debian/patches/series --- nsis-2.37/debian/patches/series +++ nsis-2.37/debian/patches/series @@ -1,0 +2 @@ +02_fix_nsdialogs_stack_corruption.patch only in patch2: unchanged: --- nsis-2.37.orig/debian/patches/02_fix_nsdialogs_stack_corruption.patch +++ nsis-2.37/debian/patches/02_fix_nsdialogs_stack_corruption.patch @@ -0,0 +1,61 @@ +02_fix_nsdialogs_stack_corruption.patch +Amir Szekely +Fix upstream #2013317: nsDialogs pollutes the stack if callbacks are not defined +Committed upstream in SVN r5675 and released in nsis 2.38 +--- a/Contrib/nsDialogs/nsDialogs.c ++++ b/Contrib/nsDialogs/nsDialogs.c +@@ -72,29 +72,44 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) + + if (HIWORD(wParam) == BN_CLICKED && ctl->type == NSCTL_BUTTON) + { +- pushint((int) hwCtl); +- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onClick - 1, 0); ++ if (ctl->callbacks.onClick) ++ { ++ pushint((int) hwCtl); ++ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onClick - 1, 0); ++ } + } + else if (HIWORD(wParam) == EN_CHANGE && ctl->type == NSCTL_EDIT) + { +- pushint((int) hwCtl); +- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0); ++ if (ctl->callbacks.onChange) ++ { ++ pushint((int) hwCtl); ++ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0); ++ } + } + else if (HIWORD(wParam) == LBN_SELCHANGE && ctl->type == NSCTL_LISTBOX) + { +- pushint((int) hwCtl); +- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0); ++ if (ctl->callbacks.onChange) ++ { ++ pushint((int) hwCtl); ++ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0); ++ } + } + else if ((HIWORD(wParam) == CBN_EDITUPDATE || HIWORD(wParam) == CBN_SELCHANGE) + && ctl->type == NSCTL_COMBOBOX) + { +- pushint((int) hwCtl); +- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0); ++ if (ctl->callbacks.onChange) ++ { ++ pushint((int) hwCtl); ++ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0); ++ } + } + else if (HIWORD(wParam) == STN_CLICKED && ctl->type == NSCTL_STATIC) + { +- pushint((int) hwCtl); +- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onClick - 1, 0); ++ if (ctl->callbacks.onClick) ++ { ++ pushint((int) hwCtl); ++ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onClick - 1, 0); ++ } + } + + break;