Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
I think I found a serious bug in zstrtoul_underscore
- X-seq: zsh-workers 50876
- From: Clinton Bunch <cdb_zsh@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: I think I found a serious bug in zstrtoul_underscore
- Date: Sat, 5 Nov 2022 16:57:37 -0500
- Archived-at: <https://zsh.org/workers/50876>
- List-id: <zsh-workers.zsh.org>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author