zsh-workers
 help / color / mirror / code / Atom feed
* I think I found a serious bug in zstrtoul_underscore
@ 2022-11-05 21:57 Clinton Bunch
  2022-11-05 22:13 ` Clinton Bunch
  2022-11-06  8:43 ` Roman Perepelitsa
  0 siblings, 2 replies; 7+ messages in thread
From: Clinton Bunch @ 2022-11-05 21:57 UTC (permalink / raw)
  To: zsh-workers

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-06 10:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-05 21:57 I think I found a serious bug in zstrtoul_underscore Clinton Bunch
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

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).