]> git.evergreen-ils.org Git - OpenSRF.git/commit
Patch from Scott McKellar to fix potential local buffer
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 11 Jul 2007 03:17:13 +0000 (03:17 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 11 Jul 2007 03:17:13 +0000 (03:17 +0000)
commite5ad2957830fb42599c7948e83f2f9573acbacb1
treed46ed4e0bdfe253cbfe3fa56efba4db5dafc7971
parenta42619ba6af31ddb4fa812f27640392ffbeb418c
Patch from Scott McKellar to fix potential local buffer
overflow attack against srfsh:

This patch fixes a potential buffer overflow in the parse_error
function.  The existing code concatenates the strtoked tokens into a
fixed-length buffer, with no check for overflow.  It isn't hard to
build an srfsh command that overflows the buffer, with baleful
results.

While it's not likely that anyone would do so by accident from the
command line, an srfsh script might well do so, especially if the
script were generated from another program.

More important, someone sufficiently clever might be able to use
such an overflow to work mischief.

My version of parse_error() uses a growing_buffer to accumulate
the tokens.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1022 9efc2488-bf62-4759-914b-345cdb29e865
src/srfsh/srfsh.c