summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 17:53:21 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 17:53:21 (EDT)
commitbfc5e48be90383aea647a061b8d97518c4274551 (patch)
tree76630d78ac5a2a35dd534efb97260f484530a547 /lib
parent6c88f66546721aebd4de2c904205f22140ff2c2d (diff)
ob_parse_changelog(): Protect [ commands from strings beginning with "-"
Diffstat (limited to 'lib')
-rw-r--r--lib/changelog.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh
index af3255e..606282e 100644
--- a/lib/changelog.sh
+++ b/lib/changelog.sh
@@ -112,8 +112,8 @@ ob_parse_changelog()
if [ -z "${source}" ] || \
[ -z "${distribution}" ] || \
[ -z "${version}" ] || \
- [ "${version% *}" != \
- "${version}" ]; then
+ [ x"${version% *}" != \
+ x"${version}" ]; then
_ob_parse_changelog_error "${file}" "${line_nr}" \
'changelog_bad_heading'
source=''
@@ -146,8 +146,8 @@ ob_parse_changelog()
maintainer="${line%% *}"
date="${line#* }"
if [ -z "${maintainer}" ] || [ -z "${date}" ] ||
- [ "${maintainer}" = "${date}" ]
- then
+ [ x"${maintainer}" = \
+ x"${date}" ]; then
_ob_parse_changelog_error "${file}" "${line_nr}" \
'changelog_bad_trailer'
maintainer=''