Loading ...
Sorry, an error occurred while loading the content.
 

Patch 5.6.086 (extra)

Expand Messages
  • Bram Moolenaar
    Patch 5.6.086 (extra) Problem: Win32: When using libcall() and the returned value is not a valid pointer, Vim crashes. Solution: Use IsBadStringPtr() to
    Message 1 of 1 , Jun 5, 2000
      Patch 5.6.086 (extra)
      Problem: Win32: When using libcall() and the returned value is not a valid
      pointer, Vim crashes.
      Solution: Use IsBadStringPtr() to check if the pointer is valid.
      Files: src/os_win32.c


      *** ../vim-5.6.85/src/os_win32.c Sat Mar 25 18:18:07 2000
      --- src/os_win32.c Mon Jun 5 12:21:21 2000
      ***************
      *** 3796,3802 ****

      // save the string before we free the library
      if (retval != NULL)
      ! retval = vim_strsave(retval);

      // Free the DLL module.
      fFreeResult = FreeLibrary(hinstLib);
      --- 3794,3807 ----

      // save the string before we free the library
      if (retval != NULL)
      ! {
      ! /* Check if the return value is a valid string pointer. Otherwise
      ! * we may crash when the function returns a number! */
      ! if (retval == (char_u *)1 || IsBadStringPtr(retval, INT_MAX))
      ! retval = NULL;
      ! else
      ! retval = vim_strsave(retval);
      ! }

      // Free the DLL module.
      fFreeResult = FreeLibrary(hinstLib);
      *** ../vim-5.6.85/src/version.c Mon Jun 5 12:18:04 2000
      --- src/version.c Mon Jun 5 12:22:31 2000
      ***************
      *** 420,421 ****
      --- 420,423 ----
      { /* Add new patch number below this line */
      + /**/
      + 86,
      /**/

      --
      If you don't get everything you want, think of
      everything you didn't get and don't want.

      /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
      \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
    Your message has been successfully submitted and would be delivered to recipients shortly.