Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2020 20:24:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 243974] diff(1) generates core dump when --tabsize is used
Message-ID:  <bug-243974-227-9tBlIbxgBP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-243974-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-243974-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243974

--- Comment #5 from commit-hook@freebsd.org ---
A commit references this bug:

Author: kevans
Date: Thu Feb 13 20:23:56 UTC 2020
New revision: 357875
URL: https://svnweb.freebsd.org/changeset/base/357875

Log:
  diff: fix segfault with --tabsize and no/malformed argument

  --tabsize was previously listed as optional_argument, but didn't account =
for
  the optionality of it in the argument handling. This is irrelevant -- the
  manpage doesn't indicate that the argument is optional, and indeed there's
  no clear interpretation of omitting the argument because there's no other
  side effect of --tabsize.

  The "malformed" argument part of the header on this message is simply
  referring to usage like this:

  % diff --tabsize 4 A B

  With an optional_argument, the argument must be attached to the parameter
  directly (e.g. --tabsize=3D4), so the argument is effectively NULL with t=
he
  above invocation as if no argument had been passed.

  PR:           243974
  Submitted by: fehmi noyan isi <fnoyanisi yahoo com> (diff.c portion)
  MFC after:    3 days

Changes:
  head/usr.bin/diff/diff.1
  head/usr.bin/diff/diff.c
  head/usr.bin/diff/tests/diff_test.sh

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



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