aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/vim-CVE-2017-5953.patch
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-02-20 12:56:14 +0200
committerEfraim Flashner <efraim@flashner.co.il>2017-02-20 12:56:14 +0200
commitd15432ca9e9359b865aac63ae47863e94bbce0e4 (patch)
treebe4e6f52cb8e31f5b5fad637c95c0a730ea76081 /gnu/packages/patches/vim-CVE-2017-5953.patch
parentdef971689052ebc3e0a68684328c28cac35b8596 (diff)
parent3b254d76132627ff62ac5571f4175669164624c5 (diff)
downloadguix-d15432ca9e9359b865aac63ae47863e94bbce0e4.tar
guix-d15432ca9e9359b865aac63ae47863e94bbce0e4.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/patches/vim-CVE-2017-5953.patch')
-rw-r--r--gnu/packages/patches/vim-CVE-2017-5953.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/patches/vim-CVE-2017-5953.patch b/gnu/packages/patches/vim-CVE-2017-5953.patch
new file mode 100644
index 0000000000..7b66f1bf16
--- /dev/null
+++ b/gnu/packages/patches/vim-CVE-2017-5953.patch
@@ -0,0 +1,24 @@
+Fix CVE-2017-5953:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5953
+https://groups.google.com/forum/#!topic/vim_dev/t-3RSdEnrHY
+
+Patch adapted from upstream commit, correcting the transcription error
+in the bounds check:
+
+https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d
+
+diff --git a/src/spellfile.c b/src/spellfile.c
+index c7d87c6..8b1a3a6 100644
+--- a/src/spellfile.c
++++ b/src/spellfile.c
+@@ -1595,6 +1595,9 @@ spell_read_tree(
+ len = get4c(fd);
+ if (len < 0)
+ return SP_TRUNCERROR;
++ if (len >= 0x3fffffff)
++ /* Invalid length, multiply with sizeof(int) would overflow. */
++ return SP_FORMERROR;
+ if (len > 0)
+ {
+ /* Allocate the byte array. */