]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.625 v7.4.625
authorBram Moolenaar <Bram@vim.org>
Tue, 10 Feb 2015 17:41:58 +0000 (18:41 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 10 Feb 2015 17:41:58 +0000 (18:41 +0100)
Problem:    Possible NULL pointer dereference.
Solution:   Check for NULL before using it. (Mike Williams)

src/if_py_both.h
src/version.c

index a46b42adda25b60d4ea01089c0ecec0029c22b66..497db86651e2da10a12655ce23b0a973e7dd9357 100644 (file)
@@ -747,12 +747,14 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
     else if (our_tv->v_type == VAR_DICT)
     {
 
-       hashtab_T       *ht = &our_tv->vval.v_dict->dv_hashtab;
-       long_u  todo = ht->ht_used;
+       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,6 +765,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
            return NULL;
        }
 
+       todo = ht->ht_used;
        for (hi = ht->ht_array; todo > 0; ++hi)
        {
            if (!HASHITEM_EMPTY(hi))
index 70a8633d03909f931786242bc54863b582cb1c35..c14eac35bb953340969c083d3bbdd10e35016e07 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    625,
 /**/
     624,
 /**/