Menu

#1254 makensis.exe sometimes crashes on Windows

3.0 Series
closed
nobody
None
3
2020-10-08
2020-10-07
adite
No
  1. Version: 3.06.1
  2. Makensis is crashing (access violation exception)
  3. I can't provide the script at this moment
  4. not GUI/related (command line only)

With "Unicode True" in NSI script makensis.exe sporadically crashes. After investing some time in debugging i have found a possible reason:
ExeHeadStringList::getnum() seems to have an incorrect implementation for unicode strings:

...
 if (m_wide)
  {
    for(;;)
    {
      if ((pos+=cb) >= cbList) break;
      cb = StrLenUTF16(p+=cb) + 1, ++num; // should be: cb = (StrLenUTF16(p+=cb) + 1) * 2, ++num;
    }
  }
  ...  

Wrong counting of "cb" is the reason for iterating over the buffer limit. This results in an access violation (sometimes).
May be related with issues #1227, #1215 and #1202.

Discussion

  • adite

    adite - 2020-10-07

    Patch added: Patch #300

     
  • Anders

    Anders - 2020-10-08
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.