summary refs log tree commit diff
path: root/gnu/packages/gd.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2019-02-15 12:22:10 -0500
committerLeo Famulari <leo@famulari.name>2019-02-19 15:47:35 -0500
commitc12b23469576fb1c3920120ef06b696daa30b855 (patch)
tree71dc5c3cb0c04666993393d7ce761e5e1f62bbb3 /gnu/packages/gd.scm
parenta7db61a55dc4e369574e206a86f9e5721f4a890b (diff)
downloadguix-c12b23469576fb1c3920120ef06b696daa30b855.tar.gz
gnu: libgd: Fix CVE-2019-{6977,6978}.
* gnu/packages/gd.scm (gd)[replacement]: New field.
(gd/fixed): New variable.
* gnu/packages/patches/gd-CVE-2019-6977.patch,
gnu/packages/patches/gd-CVE-2019-6978.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/gd.scm')
-rw-r--r--gnu/packages/gd.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm
index a53a4f2c2f..c08c1f6758 100644
--- a/gnu/packages/gd.scm
+++ b/gnu/packages/gd.scm
@@ -39,6 +39,7 @@
 (define-public gd
   (package
     (name "gd")
+    (replacement gd/fixed)
     ;; Note: With libgd.org now pointing to github.com, genuine old
     ;; tarballs are no longer available.  Notably, versions 2.0.x are
     ;; missing.
@@ -94,6 +95,16 @@ most common applications of GD involve website development.")
                            "See COPYING file in the distribution."))
     (properties '((cpe-name . "libgd")))))
 
+(define-public gd/fixed
+  (hidden-package
+    (package
+      (inherit gd)
+      (source (origin
+                (inherit (package-source gd))
+                (patches (append (origin-patches (package-source gd))
+                                 (search-patches "gd-CVE-2019-6977.patch"
+                                                 "gd-CVE-2019-6978.patch"))))))))
+
 (define-public perl-gd
   (package
     (name "perl-gd")