I have a newLISP script that uses a shared library, and upon passing it a specific argument (JSON) with a specific length (63 characters), I am able to crash newLISP.
Here is the string that crashes it:
Code: Select all
(set 'test "{\"ID\":\"somedumbuser@ahost.com\",\"DEBUG\":\"why does this crash63\"}")
Code: Select all
(set 'test "{\"ID\":\"somedumbuser@ahost.com\",\"DEBUG\":\"why does this crash6\"}")
(set 'test "{\"ID\":\"somedumbuser@ahost.com\",\"DEBUG\":\"why does this crash630\"}")
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
copyCell (cell=0x10009) at newlisp.c:2013
2013 newCell->type = cell->type;
(gdb) bt
#0 copyCell (cell=0x10009) at newlisp.c:2013
#1 0x0804be82 in copyCell (cell=0x10009) at newlisp.c:2030
#2 0x08054409 in p_println (params=0x8089e20) at newlisp.c:5749
#3 0x0804e308 in evaluateExpression (cell=0x808ba20) at newlisp.c:1389
#4 0x08052361 in evaluateStream (stream=0xbffffa1c, outDevice=0, flag=1) at newlisp.c:1116
#5 0x080525c5 in loadFile (fileName=0xbffffddc "./test.lsp", offset=0, encryptFlag=0, context=0x8099e28) at newlisp.c:2995
#6 0x08053332 in main (argc=2, argv=0xbffffc84) at newlisp.c:733