Patch 7.4.625
Problem:    Possible NULL pointer dereference.
Solution:   Check for NULL before using it. (Mike Williams)
Files:      src/if_py_both.h


*** ../vim-7.4.624/src/if_py_both.h     2015-02-03 12:55:11.136179596 +0100
--- src/if_py_both.h    2015-02-10 18:39:40.531839555 +0100
***************
*** 747,758 ****
      else if (our_tv->v_type == VAR_DICT)
      {
  
!       hashtab_T       *ht = &our_tv->vval.v_dict->dv_hashtab;
!       long_u  todo = ht->ht_used;
        hashitem_T      *hi;
        dictitem_T      *di;
        if (our_tv->vval.v_dict == NULL)
            return NULL;
  
        if (!(ret = PyDict_New()))
            return NULL;
--- 747,760 ----
      else if (our_tv->v_type == VAR_DICT)
      {
  
!       hashtab_T       *ht;
!       long_u          todo;
        hashitem_T      *hi;
        dictitem_T      *di;
+ 
        if (our_tv->vval.v_dict == NULL)
            return NULL;
+       ht = &our_tv->vval.v_dict->dv_hashtab;
  
        if (!(ret = PyDict_New()))
            return NULL;
***************
*** 763,768 ****
--- 765,771 ----
            return NULL;
        }
  
+       todo = ht->ht_used;
        for (hi = ht->ht_array; todo > 0; ++hi)
        {
            if (!HASHITEM_EMPTY(hi))
*** ../vim-7.4.624/src/version.c        2015-02-10 18:33:53.240319951 +0100
--- src/version.c       2015-02-10 18:38:37.364655345 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     625,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
212. Your Internet group window has more icons than your Accessories window.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui