[bibtool] 01/01: Imported debian patch 2.66+ds-2: #848947 fix
This is an automated email from the git hooks/post-receive script.
calculus-guest pushed a commit to branch master
in repository bibtool.
commit 74fe3290cc6138cb15da3e6db1bd089291122d6b
Author: Jerome Benoit <calculus@rezozer.net>
Date: Tue Dec 27 00:05:17 2016 +0000
Imported debian patch 2.66+ds-2: #848947 fix
---
debian/changelog | 8 ++
debian/patches/series | 1 +
...stream-fix-empty_key_separator-bug_848947.patch | 86 ++++++++++++++++++++++
3 files changed, 95 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 54e1318..7b01e7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+bibtool (2.66+ds-2) unstable; urgency=medium
+
+ * Important bug fix release (Closes: #848947), thanks to Gautam Iyer
+ <gi1242@gmail.com> for reporting the bug, and thanks to the upstream
+ Gerd Neugebauer <gene@gerd-neugebauer.de> for fixing it rapidly.
+
+ -- Jerome Benoit <calculus@rezozer.net> Tue, 27 Dec 2016 00:00:45 +0000
+
bibtool (2.66+ds-1) unstable; urgency=medium
* New upstream version.
diff --git a/debian/patches/series b/debian/patches/series
index 719846b..6b52ab8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+upstream-fix-empty_key_separator-bug_848947.patch
cleanup-upstream.patch
rationalization-upstream-doc.patch
secure-upstream-doc.patch
diff --git a/debian/patches/upstream-fix-empty_key_separator-bug_848947.patch b/debian/patches/upstream-fix-empty_key_separator-bug_848947.patch
new file mode 100644
index 0000000..006b259
--- /dev/null
+++ b/debian/patches/upstream-fix-empty_key_separator-bug_848947.patch
@@ -0,0 +1,86 @@
+apply upstream fix for bug #848947 as extract from GitHub
+(git commit 9dd8acbeb3b8045e490e6e7d692fb0f493768a5e).
+--- a/key.c
++++ b/key.c
+@@ -222,36 +222,64 @@
+ ** s New value for the given separator. The new value is
+ ** stored as a symbol. Thus the memory of |s| need not to
+ ** be preserved after this function is completed.
+-** The characters which are not allowed are silently sypressed.
++** The characters which are not allowed are silently suppressed.
+ ** Returns: nothing
+ **___________________________________________________ */
+-void set_separator(n,s) /* */
++void set_separator(n, s) /* */
+ register int n; /* */
+ String s; /* */
+ { /* */
+- if (n < 0 || n >= NoSeps || !is_allowed(*s)) /* */
+- { ERROR("Invalid separator specification."); /* */
++ if (n < 0 || n >= NoSeps) /* */
++ { ERROR("Invalid separator reference."); /* */
++ return; /* */
++ } /* */
++ while (*s && !is_allowed(*s)) { s++; } /* */
++ if (*s && !is_allowed(*s)) /* */
++ { ERROR2("Invalid separator specification: ", s);/* */
+ return; /* */
+ } /* */
+ /* */
+ if (key_seps == NULL) init_key(); /* */
+ /* */
+- key_seps[n] = sym_extract(&s, false); /* */
++ if (*s) /* */
++ { key_seps[n] = sym_extract(&s, false); /* */
++ } else { /* */
++ key_seps[n] = sym_empty; /* */
++ } /* */
+ } /*------------------------*/
+
+ /*-----------------------------------------------------------------------------
+ ** Function: get_separator()
+ ** Type: String
+-** Purpose: Getter for the key separator.
++** Purpose: Getter for the key separator. The
++** elements under the index have the following meaning:
++** \begin{description}
++** \item[0] The default key which is used when the
++** formatting instruction fails completely.
++** \item[1] The separator which is inserted between
++** different names of a multi-authored publication.
++** \item[2] The separator inserted between the first name
++** and the last name when a name is formatted.
++** \item[3] The separator inserted between the last names
++** when more then one last name is present
++** \item[4] The separator between the name and the title
++** of a publication.
++** \item[5] The separator inserted between words of the
++** title.
++** \item[6] The separator inserted before the number
++** which might be added to disambiguate reference keys.
++** \item[7] The string which is added when a list of
++** names is truncated. (|.ea|)
++** \end{description}
+ ** Arguments:
+ ** n the index
+-** Returns:
++** Returns: the separator for the given index or NULL
+ **___________________________________________________ */
+ Symbol get_separator(n) /* */
+ int n; /* */
+ { /* */
+ if (n < 0 || n >= NoSeps) /* */
+- { ERROR("Invalid separator specification."); /* */
++ { ERROR("Invalid separator reference."); /* */
+ return NULL; /* */
+ } /* */
+ return key_seps[n]; /* */
+@@ -1283,7 +1311,7 @@
+ ** Function*: add_fmt_tree()
+ ** Purpose: Extend the format tree
+ ** Arguments:
+-** s the specification of th format
++** s the specification of the format
+ ** treep the pointer to the tree to be extended
+ ** Returns: |true| iff the operation succeeds
+ **___________________________________________________ */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/bibtool.git
Reply to: