[r-cran-dotcall64] 04/05: New patches:
Sébastien Villemot
sebastien at debian.org
Thu Nov 9 21:27:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository r-cran-dotcall64.
commit 83c5dc2b08f2289232dc2e8ff89ac19d5053c90e
Author: Sébastien Villemot <sebastien at debian.org>
Date: Thu Nov 9 22:17:22 2017 +0100
New patches:
- buffer-overflow.patch
- hurd-path-max.patch
Closes: #875331
Gbp-Dch: Full
---
debian/patches/buffer-overflow.patch | 17 +++++++++++++++++
debian/patches/hurd-path-max.patch | 21 +++++++++++++++++++++
debian/patches/series | 2 ++
3 files changed, 40 insertions(+)
diff --git a/debian/patches/buffer-overflow.patch b/debian/patches/buffer-overflow.patch
new file mode 100644
index 0000000..98e34ca
--- /dev/null
+++ b/debian/patches/buffer-overflow.patch
@@ -0,0 +1,17 @@
+Description: Fix a potential buffer overflow issue
+ symName is allocated a size of MaxSymbolBytes (1024), not PATH_MAX.
+Author: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2017-11-09
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/dotCall64.c
++++ b/src/dotCall64.c
+@@ -107,7 +107,7 @@ SEXP dC64(SEXP args_in) {
+
+ // Copy the symbol Name:
+ p = translateChar(STRING_ELT(CAR(args_in), 0));
+- if(strlen(p) > PATH_MAX - 1)
++ if(strlen(p) > MaxSymbolBytes - 1)
+ error(_("argument '.NAME' is too long (dotCall64)"));
+ strcpy(symName, p);
+
diff --git a/debian/patches/hurd-path-max.patch b/debian/patches/hurd-path-max.patch
new file mode 100644
index 0000000..2b6910d
--- /dev/null
+++ b/debian/patches/hurd-path-max.patch
@@ -0,0 +1,21 @@
+Description: Fix build failure on GNU/Hurd
+ PATH_MAX is not defined on GNU/Hurd, so give a decent default value.
+Author: Sébastien Villemot <sebastien at debian.org>
+Bug-Debian: https://bugs.debian.org/875331
+Last-Update: 2017-11-09
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/dotCall64.c
++++ b/src/dotCall64.c
+@@ -26,7 +26,10 @@
+ // copied from dotcode.c:69
+ #define MaxSymbolBytes 1024
+
+-
++// Define PATH_MAX for GNU/Hurd
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
+
+ /* Attributes like PACKAGE have to be prefixed in order to not get interpreted by .External(...) */
+ #define SYMBOL_PREFIX "dotCall64"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1a4782e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+buffer-overflow.patch
+hurd-path-max.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-dotcall64.git
More information about the debian-science-commits
mailing list