All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: Diego Kreutz <kreutz@acm.org>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [bug report] cal command segmentation fault
Date: Mon, 15 Feb 2021 15:55:43 +0000	[thread overview]
Message-ID: <CAG27Bk0AV-7VmDj89Cfw5N_aRxtOzC4Ua8BZ7QPtuHB4qtYD_w@mail.gmail.com> (raw)
In-Reply-To: <CADjQn4h=J-K=HdGc-WJHLeK4WfepRbjsTL3EWbwfwDwJxZosXw@mail.gmail.com>

On Mon, 15 Feb 2021 at 15:31, Diego Kreutz <kreutz@acm.org> wrote:
> I found a bug in the cal command. It is a segmentation fault for the
> following input.
>
> cal -d 20210516
> Segmentation fault: 11
>
> The segmentation fault happens with exactly 8 digits. However, there
> is something going wrong with more digits as well. With 9 or more
> digits, the command's output gets weird.
>
> I checked the bug in three systems (Debian 10, OS X, and Ubuntu Server 16.04).
>
> Linux NAME 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08)
> x86_64 GNU/Linux
>
> Darwin NAME 19.6.0 Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05
> PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64
>
> Linux NAME 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC
> 2018 x86_64 x86_64 x86_64 GNU/Linux
>
> Unfortunately, I don't have the time to go through the code and
> provide a detailed fix for the issue. However, I assume it should be
> fairly straightforward for the maintainers to find and fix this bug.

Hi Diego

I am almost certain you reached wrong mail-list. The util-linux cal(1)
does not have -d option,

$ cal -d 20210516
cal: invalid option -- 'd'
Try 'cal --help' for more information.

$ cal --version
cal from util-linux 2.36.2

I suspect you might be using GNU cal that has -d, --include-today
option[1].  If that is correct
the report is best to forward to related mail-list[2].

[1] https://www.gnu.org/software/gcal/manual/gcal.html#index-_002dd
[2] https://www.gnu.org/software/gcal/

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

      parent reply	other threads:[~2021-02-15 16:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 15:28 [bug report] cal command segmentation fault Diego Kreutz
2021-02-15 15:48 ` Anatoly Pugachev
2021-02-15 15:56   ` Diego Kreutz
2021-02-15 15:55 ` Sami Kerola [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG27Bk0AV-7VmDj89Cfw5N_aRxtOzC4Ua8BZ7QPtuHB4qtYD_w@mail.gmail.com \
    --to=kerolasa@iki.fi \
    --cc=kerolasa@gmail.com \
    --cc=kreutz@acm.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.