* [bug report] cal command segmentation fault
@ 2021-02-15 15:28 Diego Kreutz
2021-02-15 15:48 ` Anatoly Pugachev
2021-02-15 15:55 ` Sami Kerola
0 siblings, 2 replies; 4+ messages in thread
From: Diego Kreutz @ 2021-02-15 15:28 UTC (permalink / raw)
To: util-linux
Hi,
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.
Best regards,
Diego
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] cal command segmentation fault
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
1 sibling, 1 reply; 4+ messages in thread
From: Anatoly Pugachev @ 2021-02-15 15:48 UTC (permalink / raw)
To: Diego Kreutz; +Cc: util-linux
On Mon, Feb 15, 2021 at 6:31 PM Diego Kreutz <kreutz@acm.org> wrote:
>
> Hi,
>
> I found a bug in the cal command. It is a segmentation fault for the
> following input.
>
> cal -d 20210516
> Segmentation fault: 11
where does your 'cal' command comes from? i can't find '-d'
option/command line switch for util-linux cal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] cal command segmentation fault
2021-02-15 15:28 [bug report] cal command segmentation fault Diego Kreutz
2021-02-15 15:48 ` Anatoly Pugachev
@ 2021-02-15 15:55 ` Sami Kerola
1 sibling, 0 replies; 4+ messages in thread
From: Sami Kerola @ 2021-02-15 15:55 UTC (permalink / raw)
To: Diego Kreutz; +Cc: util-linux
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] cal command segmentation fault
2021-02-15 15:48 ` Anatoly Pugachev
@ 2021-02-15 15:56 ` Diego Kreutz
0 siblings, 0 replies; 4+ messages in thread
From: Diego Kreutz @ 2021-02-15 15:56 UTC (permalink / raw)
To: Anatoly Pugachev; +Cc: util-linux
hi Anatoly,
sorry, it's from bsdmainutils. it's ncal, actually.
sudo apt-get install bsdmainutils
best,
diego
On Mon, Feb 15, 2021 at 12:49 PM Anatoly Pugachev <matorola@gmail.com> wrote:
>
> On Mon, Feb 15, 2021 at 6:31 PM Diego Kreutz <kreutz@acm.org> wrote:
> >
> > Hi,
> >
> > I found a bug in the cal command. It is a segmentation fault for the
> > following input.
> >
> > cal -d 20210516
> > Segmentation fault: 11
>
> where does your 'cal' command comes from? i can't find '-d'
> option/command line switch for util-linux cal
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-15 16:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.