Menu

#10 Fix segmentation fault parsing $ in input

open
nobody
None
5
2006-01-13
2006-01-13
Ed Avis
No

sqsh segfaults given the following input file:

$
go

The bug is in variable name expansion. The empty
string is passed to atoi(), which gives zero, but there
is no argument number zero.

This patch fixes it, or at least sqsh no longer
segfaults. I'm not sure what the correct behaviour
should be; if you give for example ${44} as the
variable then it's silently accepted.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.