Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2019 06:19:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 241714] /usr/bin/diff --tabsize dies with SIGSEGV
Message-ID:  <bug-241714-227-ERFLW7hzTN@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-241714-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-241714-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241714

pprocacci@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pprocacci@gmail.com

--- Comment #3 from pprocacci@gmail.com ---
tabsize is set to have an optional argument.
I can't explain why as it seems to me it always require an argument.
This patch here makes tabsize require an argument which also solves the problem
of the SEGfault as line 255 of diff.c is expecting optarg to be something.


--- diff.c.orig 2019-11-20 01:16:41.377456000 -0500
+++ diff.c      2019-11-20 01:16:51.176400000 -0500
@@ -90,7 +90,7 @@
        { "no-ignore-file-name-case",   no_argument,            NULL,  
OPT_NO_IGN_FN_CASE },
        { "normal",                     no_argument,            NULL,  
OPT_NORMAL },
        { "strip-trailing-cr",          no_argument,            NULL,  
OPT_STRIPCR },
-       { "tabsize",                    optional_argument,      NULL,  
OPT_TSIZE },
+       { "tabsize",                    required_argument,      NULL,  
OPT_TSIZE },
        { "changed-group-format",       required_argument,      NULL,  
OPT_CHANGED_GROUP_FORMAT},
        { NULL,                         0,                      0,      '\0'}
 };

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241714-227-ERFLW7hzTN>