File CVE-2017-5953.patch of Package vim

Index: vim72/src/spell.c
===================================================================
--- vim72.orig/src/spell.c
+++ vim72/src/spell.c
@@ -3953,6 +3953,8 @@ spell_read_tree(fd, bytsp, idxsp, prefix
     len = get4c(fd);
     if (len < 0)
 	return SP_TRUNCERROR;
+    if (len >= 0x3ffffff)
+        return SP_FORMERROR;
     if (len > 0)
     {
 	/* Allocate the byte array. */
openSUSE Build Service is sponsored by