notepad-plus-plus-legacy/PowerEditor
Don HO 10f6ff6c1f
Fix a crash (regression) due to "new-less" of NppParameters
The commit 'Make NppParameters singleton "new-less"' make NppParameters instantiate in the stack instead of allocating in the heap:
3dbb2c4b8e

It makes Notepad++ crash:
https://community.notepad-plus-plus.org/topic/18316/notepad-7-8-release-candidate-3/4

The crash is on following code:

  vector<MacroShortcut> & vShortcuts = NppParameters::getInstance().getMacroList();
  size_t nbItems = vShortcuts.size();
  for (size_t itemIndex2 = 0; itemIndex2 < nbItems; ++itemIndex2)
  {
  ...

vShortcuts.size() here return a random large number, which makes crash.

The explanation about vector::size() unexpected behaviour:
https://stackoverflow.com/questions/30548944/c-vector-size-is-wrong-and-higher-than-the-number-of-elements

Obviously the stack size is not large enough to contain NppParameters singleton in 64 bits.
2019-10-03 14:05:50 +02:00
..
bin Code enhancement: Use C++11 =default & =delete for the constructor & destructor 2019-08-19 02:05:21 +02:00
gcc MinGW GCC update 2016-10-31 14:03:29 +01:00
installer Fix include new release files problem 2019-10-02 03:36:26 +02:00
misc/chameleon Remove the old icon 2016-09-21 09:06:22 +02:00
scintilla.original.forUpdating Upgrade Scintilla from 4.1.4 to 4.2.0 2019-07-22 13:08:41 +02:00
src Fix a crash (regression) due to "new-less" of NppParameters 2019-10-03 14:05:50 +02:00
Test/FunctionList Remove BOM from 2 localization files 2019-03-15 03:13:31 +01:00
visual.net Use standard C++11 mutex 2019-08-25 23:34:30 +02:00