summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-07-10 16:21:36 -0400
committerJoey Hess <joey@kitenet.net>2013-07-10 16:21:36 -0400
commit8ba4087b31aef2225681da0f011002f8053be61c (patch)
treef848393280d17bcedcae21a19a08f78799b210f9
parentc18babad60373c4aada08074a0de62c0e44a80d9 (diff)
errno, isutf8: Fix zero-termination of option list, which could lead to getopt crash. Closes: #715867 (Thanks, Mayhem Team)
-rw-r--r--debian/changelog3
-rw-r--r--errno.c1
-rw-r--r--isutf8.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index ccf3c16..96ba19a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
moreutils (0.49) UNRELEASED; urgency=low
* ts: Fix timezone used with -i
+ * errno, isutf8: Fix zero-termination of option list, which could lead
+ to getopt crash. Closes: #715867
+ (Thanks, Mayhem Team)
-- Joey Hess <joeyh@debian.org> Sun, 05 May 2013 11:20:57 -0400
diff --git a/errno.c b/errno.c
index fd130c1..d2f68a1 100644
--- a/errno.c
+++ b/errno.c
@@ -133,6 +133,7 @@ options[] = {
{ "list", 0, NULL, 'l' },
{ "search", 0, NULL, 's' },
{ "search-all-locales", 0, NULL, 'S' },
+ { 0, 0, 0, 0 }
};
diff --git a/isutf8.c b/isutf8.c
index c5f5eeb..9711124 100644
--- a/isutf8.c
+++ b/isutf8.c
@@ -227,6 +227,7 @@ int main(int argc, char **argv) {
struct option options[] = {
{ "help", no_argument, NULL, 'h' },
{ "quiet", no_argument, &quiet, 1 },
+ { 0, 0, 0, 0 }
};
int opt;