Skip to content
Snippets Groups Projects
Commit a068dba7 authored by Mark H Weaver's avatar Mark H Weaver
Browse files

gnu: grep: Apply fix for CVE-2015-1345.

* gnu/packages/patches/grep-CVE-2015-1345.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/base.scm (grep): Add patch.
parent 8a00b930
No related branches found
No related tags found
No related merge requests found
...@@ -398,6 +398,7 @@ dist_patch_DATA = \ ...@@ -398,6 +398,7 @@ dist_patch_DATA = \
gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \ gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
gnu/packages/patches/gobject-introspection-cc.patch \ gnu/packages/patches/gobject-introspection-cc.patch \
gnu/packages/patches/gobject-introspection-girepository.patch \ gnu/packages/patches/gobject-introspection-girepository.patch \
gnu/packages/patches/grep-CVE-2015-1345.patch \
gnu/packages/patches/grub-gets-undeclared.patch \ gnu/packages/patches/grub-gets-undeclared.patch \
gnu/packages/patches/gstreamer-0.10-bison3.patch \ gnu/packages/patches/gstreamer-0.10-bison3.patch \
gnu/packages/patches/gstreamer-0.10-silly-test.patch \ gnu/packages/patches/gstreamer-0.10-silly-test.patch \
......
...@@ -73,7 +73,8 @@ (define-public grep ...@@ -73,7 +73,8 @@ (define-public grep
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1pp5n15qwxrw1pibwjhhgsibyv5cafhamf8lwzjygs6y00fa2i2j")))) "1pp5n15qwxrw1pibwjhhgsibyv5cafhamf8lwzjygs6y00fa2i2j"))
(patches (list (search-patch "grep-CVE-2015-1345.patch")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(synopsis "Print lines matching a pattern") (synopsis "Print lines matching a pattern")
(description (description
......
Fix CVE-2015-1345. From upstream commit
83a95bd8c8561875b948cadd417c653dbe7ef2e2
by Yuliy Pisetsky <ypisetsky@fb.com>.
diff --git a/src/kwset.c b/src/kwset.c
index 4003c8d..376f7c3 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
if (! tp)
return -1;
tp++;
+ if (ep <= tp)
+ break;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment