From 8ba4087b31aef2225681da0f011002f8053be61c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Jul 2013 16:21:36 -0400 Subject: errno, isutf8: Fix zero-termination of option list, which could lead to getopt crash. Closes: #715867 (Thanks, Mayhem Team) --- debian/changelog | 3 +++ errno.c | 1 + isutf8.c | 1 + 3 files changed, 5 insertions(+) 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 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; -- cgit v1.2.3