From: Clinton Bunch <cdb_zsh@zentaur.org>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: I think I found a serious bug in zstrtoul_underscore
Date: Sat, 5 Nov 2022 16:57:37 -0500 [thread overview]
Message-ID: <c5030e0c-d1a0-352a-bb2d-ae9768b122fd@zentaur.org> (raw)
This is how I'm calling it:
if (!zstrtoul_underscore(OPT_ARG(ops, 'L'), &lower)) {
lower is declared as a zulong.
When fed a negative number it seg faults, on Rocky Linux 8 at least.
Example:
helikon[~/tmp/zsh]% getrandom -L 0 -U $(( 2**32-1))
Test before convert -L
Test after convert -L
377689410
helikon[~/tmp/zsh]% getrandom -L -1 -U 5
Test before convert -L
zsh: segmentation fault (core dumped) ~/local/bin/zsh
next reply other threads:[~2022-11-05 21:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 21:57 Clinton Bunch [this message]
2022-11-05 22:13 ` Clinton Bunch
2022-11-05 23:41 ` Clinton Bunch
2022-11-06 0:24 ` [PATCH} " Clinton Bunch
2022-11-06 5:16 ` Mikael Magnusson
2022-11-06 8:43 ` Roman Perepelitsa
2022-11-06 10:30 ` Clinton Bunch
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=c5030e0c-d1a0-352a-bb2d-ae9768b122fd@zentaur.org \
--to=cdb_zsh@zentaur.org \
--cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).