Jsish v3.5.0 was discovered to contain a memory leak via linenoise at src/linenoise.c.
cpe:2.3:a:jsish:jsish:3.5.0:*:*:*:*:*:*:*
E97897F2-55BD-40DD-9F33-7980D892A505
OR
###### Jsish revision

Commit: [9fa798e](https://github.com/pcmacdon/jsish/commit/9fa798e35d7a753672d1bd16e98b124e7b2d2899)

Version: v3.5.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
export CFLAGS='-fsanitize=address'
make
```



###### Test case

```javascript
var JSEtest = [
    'aa',
    'bb',
    'hhh'
];
try { Number.bind(console.input('listNum' + JSEtest), 4)(); } catch (e) {};
try { (1 >> y).toFixed.bind(2, 4)(); } catch (e) {};
(1 >> y).toFixed.bind(2, 4)();
```

​	

###### Execution steps & Output

```bash
$ ./jsish/jsish poc.js

listNum [object Object]
/home/user/poc.js:10: error: apply Number.toFixed to a non-number object
ERROR:
=================================================================
ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7f0e5412d538 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x77538)
    #1 0x56523c6594ad in linenoise src/linenoise.c:1061
SUMMARY: AddressSanitizer: 1 byte(s) leaked in 1 allocation(s).
```
Credits: Found by OWL337 team.
Memory leaks in linenoise src/linenoise.c:1061
This is a GitHub Issue
repo:jsish
owner:pcmacdon
Title : Memory leaks in linenoise src/linenoise.c:1061
Issue date:

--- start body ---
###### Jsish revision

Commit: [9fa798e](https://github.com/pcmacdon/jsish/commit/9fa798e35d7a753672d1bd16e98b124e7b2d2899)

Version: v3.5.0



###### Build platform

Ubuntu 18.04.5 LTS (Linux 5.4.0-44-generic x86_64)



###### Build steps

```bash
export CFLAGS='-fsanitize=address'
make
```



###### Test case

```javascript
var JSEtest = [
    'aa',
    'bb',
    'hhh'
];
try { Number.bind(console.input('listNum' + JSEtest), 4)(); } catch (e) {};
try { (1 >> y).toFixed.bind(2, 4)(); } catch (e) {};
(1 >> y).toFixed.bind(2, 4)();
```

​	

###### Execution steps & Output

```bash
$ ./jsish/jsish poc.js

listNum [object Object]
/home/user/poc.js:10: error: apply Number.toFixed to a non-number object
ERROR:
=================================================================
ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7f0e5412d538 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x77538)
    #1 0x56523c6594ad in linenoise src/linenoise.c:1061
SUMMARY: AddressSanitizer: 1 byte(s) leaked in 1 allocation(s).
```
Credits: Found by OWL337 team.
--- end body ---

comments :
--- start comments ---

--- end comments ---