0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.4.625

Problem:    Possible NULL pointer dereference.
Solution:   Check for NULL before using it. (Mike Williams)
This commit is contained in:
Bram Moolenaar
2015-02-10 18:41:58 +01:00
parent 9abd5c6507
commit 24a6ff88bc
2 changed files with 7 additions and 2 deletions

View File

@@ -747,12 +747,14 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
else if (our_tv->v_type == VAR_DICT) else if (our_tv->v_type == VAR_DICT)
{ {
hashtab_T *ht = &our_tv->vval.v_dict->dv_hashtab; hashtab_T *ht;
long_u todo = ht->ht_used; long_u todo;
hashitem_T *hi; hashitem_T *hi;
dictitem_T *di; dictitem_T *di;
if (our_tv->vval.v_dict == NULL) if (our_tv->vval.v_dict == NULL)
return NULL; return NULL;
ht = &our_tv->vval.v_dict->dv_hashtab;
if (!(ret = PyDict_New())) if (!(ret = PyDict_New()))
return NULL; return NULL;
@@ -763,6 +765,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
return NULL; return NULL;
} }
todo = ht->ht_used;
for (hi = ht->ht_array; todo > 0; ++hi) for (hi = ht->ht_array; todo > 0; ++hi)
{ {
if (!HASHITEM_EMPTY(hi)) if (!HASHITEM_EMPTY(hi))

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
625,
/**/ /**/
624, 624,
/**/ /**/