]> granicus.if.org Git - vim/commitdiff
patch 8.1.1465: allocating wrong amount of memory v8.1.1465
authorBram Moolenaar <Bram@vim.org>
Tue, 4 Jun 2019 20:29:10 +0000 (22:29 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 4 Jun 2019 20:29:10 +0000 (22:29 +0200)
Problem:    Allocating wrong amount of memory. (Yegappan Lakshmanan)
Solution:   Use sizeof() for right type of struct.

src/memfile_test.c
src/version.c

index 8408498e9153e48cdce9948316cbc7a01249bda7..0a20330e69848ae7410b4b114cc0c606ec1a0834 100644 (file)
@@ -67,7 +67,7 @@ test_mf_hash(void)
        assert(mf_hash_find(&ht, key) == NULL);
 
        /* allocate and add new item */
-       item = LALLOC_CLEAR_ONE(mf_hashtab_T);
+       item = LALLOC_CLEAR_ONE(mf_hashitem_T);
        assert(item != NULL);
        item->mhi_key = key;
        mf_hash_add_item(&ht, item);
index 57f6db3911b6e48717c4c521f790c04512f03ccf..6fcd05737c468e866cb55438cdf987b69facf4d1 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1465,
 /**/
     1464,
 /**/