diff options
| -rw-r--r-- | debian/changelog | 7 | ||||
| -rw-r--r-- | debian/patches/04-getopt.patch | 11 | ||||
| -rw-r--r-- | debian/patches/series | 1 | ||||
| -rw-r--r-- | toke/toke.c | 2 |
4 files changed, 20 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 1a161d6..f9a5727 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +fcode-utils (1.0.2-5) unstable; urgency=low + + * Add patches/04-getopt.patch to fix invalid option detection, otherwise + causing a segmentation fault, as found by Mayhem. + + -- Aurelien Jarno <aurel32@debian.org> Thu, 27 Jun 2013 02:58:55 +0200 + fcode-utils (1.0.2-4) unstable; urgency=low * Switch to dpkg-source 3.0 (quilt) format. diff --git a/debian/patches/04-getopt.patch b/debian/patches/04-getopt.patch new file mode 100644 index 0000000..41b5de8 --- /dev/null +++ b/debian/patches/04-getopt.patch @@ -0,0 +1,11 @@ +--- a/toke/toke.c ++++ b/toke/toke.c +@@ -299,7 +299,7 @@ static void get_args( int argc, char **a + /* Distinguish between a '?' from the user + * and one getopt() returned + */ +- if ( argv[argindx][1] != '?' ) ++ if (optopt ) + { + inval_opt = TRUE; + break; diff --git a/debian/patches/series b/debian/patches/series index c12380d..d8abd70 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 02-toke-olen-type.patch #tmp 03-makefile.patch +04-getopt.patch diff --git a/toke/toke.c b/toke/toke.c index 9f0dbf9..2afd48a 100644 --- a/toke/toke.c +++ b/toke/toke.c @@ -299,7 +299,7 @@ static void get_args( int argc, char **argv ) /* Distinguish between a '?' from the user * and one getopt() returned */ - if ( argv[argindx][1] != '?' ) + if (optopt ) { inval_opt = TRUE; break; |
