idx
int64 0
522k
| project
stringclasses 631
values | commit_id
stringlengths 7
40
| project_url
stringclasses 630
values | commit_url
stringlengths 4
164
| commit_message
stringlengths 0
11.5k
| target
int64 0
1
| func
stringlengths 5
484k
| func_hash
float64 1,559,120,642,045,605,000,000,000B
340,279,892,905,069,500,000,000,000,000B
| file_name
stringlengths 4
45
| file_hash
float64 25,942,829,220,065,710,000,000,000B
340,272,304,251,680,200,000,000,000,000B
⌀ | cwe
sequencelengths 0
1
| cve
stringlengths 4
16
| cve_desc
stringlengths 0
2.3k
| nvd_url
stringlengths 37
49
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
520,515 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC jsi_InitNumber(Jsi_Interp *interp, int release)
{
if (release) return JSI_OK;
Jsi_Value *val, *global = interp->csc;
val = interp->Number_prototype = Jsi_CommandCreateSpecs(interp, "Number", numberCmds, NULL, JSI_CMDSPEC_ISOBJ);
Jsi_Value *NaN = Jsi_ValueMakeNumber(interp, NULL, Jsi_NumberNaN());
Jsi_Value *Inf = Jsi_ValueMakeNumber(interp, NULL, Jsi_NumberInfinity(1));
Jsi_ValueInsertFixed(interp, global, "NaN", NaN);
Jsi_ValueInsertFixed(interp, global, "Infinity", Inf);
interp->NaNValue = NaN;
interp->InfValue = Inf;
#define MCONST(name,v) Jsi_ValueInsert(interp, val, name, Jsi_ValueNewNumber(interp, v), JSI_OM_READONLY)
MCONST("MAX_VALUE", DBL_MAX);
MCONST("MIN_VALUE", DBL_MIN);
MCONST("NEGATIVE_INFINITY", Jsi_NumberInfinity(-1));
Jsi_ValueInsertFixed(interp, val, "POSITIVE_INFINITY", Inf);
Jsi_ValueInsertFixed(interp, val, "NaN", NaN);
return JSI_OK;
} | 271,080,532,644,147,600,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,516 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC freeCmdSpecTbl(Jsi_Interp *interp, Jsi_MapEntry *hPtr, void *ptr) {
if (!ptr) return JSI_OK;
jsi_CmdSpecDelete(interp, ptr);
return JSI_OK;
} | 238,655,302,542,067,800,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,517 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static int jsi_FromHexStr(const char *in, uchar *outdata) {
int n = 0;
while (in[0] && in[1]) {
if (!isxdigit(in[0]) || isxdigit(in[0]))
return -1;
outdata[n++] = jsi_fromHexChar(in[0]) << 4 | jsi_fromHexChar(in[1]);
in+=2;
}
return n;
} | 310,300,189,606,422,080,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,518 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static bool fileObjIsTrue(void *data)
{
FileObj *fo = (FileObj *)data;
SIGASSERT(fo,FILEOBJ);
if (!fo->filename) return JSI_OK;
else return 1;
} | 251,233,713,548,131,850,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,519 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC StringToTitleCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
int sLen, bLen;
const char *vstr;
ChkString(_this, funcPtr, vstr, &sLen, &bLen);
Jsi_DString dStr;
Jsi_DSInit(&dStr);
jsi_utf_tocase(vstr, 2, &dStr);
Jsi_ValueFromDS(interp, &dStr, ret);
return JSI_OK;
} | 117,357,502,485,296,450,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,520 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC WebSocketVersionCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
const char *verStr = NULL;
verStr = lws_get_library_version();
if (verStr) {
char buf[JSI_MAX_NUMBER_STRING], *cp;
snprintf(buf, sizeof(buf), "%s", verStr);
cp = Jsi_Strchr(buf, ' ');
if (cp) *cp = 0;
Jsi_ValueMakeStringDup(interp, ret, buf);
}
return JSI_OK;
} | 195,204,057,254,180,540,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,521 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Obj *Jsi_ValueGetObj(Jsi_Interp *interp, Jsi_Value* v)
{
if (v->vt == JSI_VT_OBJECT) {
return v->d.obj;
}
return NULL;
} | 238,371,725,347,349,600,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,522 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static int jsi_FSCreateDirectoryProc(Jsi_Interp *interp, Jsi_Value* path) {
const char *pathPtr = Jsi_ValueToString(interp, path, NULL);
Jsi_DString dStr = {};
int rc;
if (*pathPtr == '~')
pathPtr = jsi_TildePath(interp, pathPtr, &dStr);
#ifdef __WIN32
rc = mkdir(pathPtr);
#else
rc = mkdir(pathPtr, 0666);
#endif
Jsi_DSFree(&dStr);
return rc;
} | 271,087,487,770,216,550,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,523 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void jsi_SortDString(Jsi_Interp *interp, Jsi_DString *dStr, const char *sep) {
int argc, i;
char **argv;
Jsi_DString sStr;
Jsi_DSInit(&sStr);
Jsi_SplitStr(Jsi_DSValue(dStr), &argc, &argv, sep, &sStr);
qsort(argv, argc, sizeof(char*), jsi_cmpstringp);
Jsi_DSSetLength(dStr, 0);
for (i=0; i<argc; i++)
Jsi_DSAppend(dStr, (i?" ":""), argv[i], NULL);
Jsi_DSFree(&sStr);
} | 292,036,961,412,322,780,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,524 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC SqliteEvalCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
int rc = SQLITE_OK, rc2;
Jsi_Db *jdb;
sqlite3_stmt *pStmt = NULL;
if (!(jdb = dbGetDbHandle(interp, _this, funcPtr))) return JSI_ERROR;
sqlite3 *db = jdb->db;
const char *zSql = Jsi_ValueArrayIndexToStr(interp, args, 0, NULL);
const char *zStart = zSql, *zLeftover = NULL, *zErrMsg = NULL;
int lnum = 1;
if (jdb->echo && zSql)
Jsi_LogInfo("SQL-EVAL: %s\n", zSql);
while( zSql && zSql[0] && (SQLITE_OK == rc) ) {
rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover);
if( SQLITE_OK != rc ) {
break;
} else {
if( !pStmt ) {
/* this happens for a comment or white-space */
zSql = zLeftover;
while( isspace(zSql[0]) ) zSql++;
continue;
}
do {
if (jdb->debug & TMODE_STEP)
JSI_DBQUERY_PRINTF( "DEBUG: step: %s\n", zSql);
rc = sqlite3_step(pStmt);
} while( rc == SQLITE_ROW );
rc2 = sqlite3_finalize(pStmt);
if( rc!=SQLITE_NOMEM ) rc = rc2;
if( rc==SQLITE_OK ) {
zSql = zLeftover;
while( isspace(zSql[0]) ) zSql++;
} else {
}
}
}
if (rc == SQLITE_OK) {
Jsi_ValueMakeNumber(interp, ret, (Jsi_Number)sqlite3_changes(jdb->db));
return JSI_OK;
}
while (zSql && zStart<zSql) {
if (zStart[0] == '\n') lnum++;
zStart++;
}
zErrMsg = sqlite3_errmsg(db);
Jsi_LogError("sqlite error: %s in statement at line %d", (zErrMsg ? zErrMsg : ""), lnum);
return JSI_ERROR;
} | 320,451,343,089,256,840,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,525 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_List *Jsi_ListNew(Jsi_Interp *interp, Jsi_Wide flags, Jsi_HashDeleteProc *freeProc)
{
Jsi_List *list = (Jsi_List *)Jsi_Calloc(1, sizeof(Jsi_List));
list->sig = JSI_SIG_LIST;
list->opts.flags = flags;
list->opts.freeHashProc = freeProc;
list->opts.interp = interp;
list->opts.mapType = JSI_MAP_LIST;
list->opts.keyType = (Jsi_Key_Type)-1;
return list;
} | 320,675,751,742,181,520,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,526 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC NumberIsSafeIntegerCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr) {
return jsi_NumberIsFiniteCmd(interp, args, _this, ret, funcPtr, 4);
} | 208,760,056,053,811,000,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,527 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static int StringPtrCompare(Jsi_Tree *treePtr, const void *key1, const void *key2)
{
//return (key1 - key2);
if (key1 == key2) return 0;
//return Jsi_DictionaryCompare((char*)key1, (char*)key2);
return Jsi_Strcmp((char*)key1, (char*)key2);
} | 126,754,818,272,896,350,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,528 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void jsi_mark_local(Jsi_OpCodes *ops) // Mark variables as declared with "var"
{
return;
int i = 0;
if (ops == NULL || ops->codes == NULL)
return;
while (i < ops->code_len) {
if (ops->codes[i].op == OP_PUSHVAR)
ops->codes[i].local = 1;
i++;
}
} | 75,953,389,919,186,680,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,529 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | int Jsi_Ungetc(Jsi_Interp *interp, Jsi_Channel chan, int ch) {
if (chan->fsPtr==0 || !chan->fsPtr->ungetcProc) return -1;
return chan->fsPtr->ungetcProc(chan, ch);
} | 14,849,959,554,419,699,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,530 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | jsi_HashArray(const void *key, size_t length )
{
const uchar *string = (const uchar *) key;
unsigned int result = 0;
int i;
for (i=0 ; i<(int)length; i++) {
result += (result<<3) + string[i];
}
return (jsi_Hash)result;
} | 149,775,510,995,157,870,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,531 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void *Jsi_DbHandle(Jsi_Interp *interp, Jsi_Db* jdb)
{
if (!jsi_dbVfsPtr) {
printf( "Sqlite unsupported\n");
return NULL;
}
return jsi_dbVfsPtr->dbHandle(interp, jdb);
} | 167,667,188,193,685,600,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,532 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC StringConcatCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
int sLen, bLen;
const char *vstr;
ChkString(_this, funcPtr, vstr, &sLen, &bLen);
Jsi_DString dStr = {};
Jsi_DSAppend(&dStr, vstr, NULL);
int i, argc = Jsi_ValueGetLength(interp, args);
for (i=skip; i<argc; i++)
{
Jsi_Value *s = Jsi_ValueArrayIndex(interp, args, i);
if (Jsi_GetStringFromValue(interp, s, &vstr)) {
Jsi_LogError("String get failure");
Jsi_DSFree(&dStr);
return JSI_ERROR;
}
Jsi_DSAppend(&dStr, vstr, NULL);
}
Jsi_ValueFromDS(interp, &dStr, ret);
return JSI_OK;
} | 84,329,019,525,332,940,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,533 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void jsi_DumpFunctions(Jsi_Interp *interp, const char *spnam) {
Jsi_DString dStr;
Jsi_DSInit(&dStr);
Jsi_MapEntry *hPtr;
Jsi_MapSearch search;
Jsi_CmdSpecItem *csi = NULL;
Jsi_CmdSpec *cs;
Jsi_Value *lsf = interp->lastSubscriptFail;
Jsi_Obj *lso = ((lsf && lsf->vt == JSI_VT_OBJECT)?lsf->d.obj:0);
const char *varname = NULL;
int m = 0;
if (lso) {
spnam = interp->lastSubscriptFailStr;
if (!spnam) spnam = interp->lastPushStr;
if (!spnam) spnam = "";
if (lso->ot == JSI_OT_USEROBJ && lso->d.uobj->reg && lso->d.uobj->interp == interp) {
cs = lso->d.uobj->reg->spec;
if (cs)
goto dumpspec;
} else if (lso->ot == JSI_OT_FUNCTION) {
cs = lso->d.fobj->func->cmdSpec;
if (cs)
goto dumpspec;
} else if (lso->ot == JSI_OT_OBJECT) {
jsiObjGetNames(interp, lso, &dStr, JSI_NAME_FUNCTIONS);
Jsi_LogError("'%s', functions are: %s.",
spnam, Jsi_DSValue(&dStr));
Jsi_DSFree(&dStr);
return;
} else {
const char *sustr = NULL;
switch (lso->ot) {
case JSI_OT_STRING: sustr = "String"; break;
case JSI_OT_NUMBER: sustr = "Number"; break;
case JSI_OT_BOOL: sustr = "Boolean"; break;
default: break;
}
if (sustr) {
hPtr = Jsi_MapEntryFind(interp->cmdSpecTbl, sustr);
csi = (Jsi_CmdSpecItem*)Jsi_MapValueGet(hPtr);
cs = csi->spec;
if (!spnam[0])
spnam = sustr;
goto dumpspec;
}
}
}
if (!spnam) spnam = "";
if (!*spnam) {
for (hPtr = Jsi_MapSearchFirst(interp->cmdSpecTbl, &search, 0);
hPtr; hPtr = Jsi_MapSearchNext(&search)) {
csi = (Jsi_CmdSpecItem*)Jsi_MapValueGet(hPtr);
if (csi->name && csi->name[0])
Jsi_DSAppend(&dStr, (m++?" ":""), csi->name, NULL);
}
Jsi_MapSearchDone(&search);
}
varname = spnam;
if ((hPtr = Jsi_MapEntryFind(interp->cmdSpecTbl, spnam))) {
csi = (Jsi_CmdSpecItem*)Jsi_MapValueGet(hPtr);
while (csi) {
int n;
cs = csi->spec;
dumpspec:
n = 0;
while (cs->name) {
if (n != 0 || !(cs->flags & JSI_CMD_IS_CONSTRUCTOR)) {
if (!*cs->name) continue;
Jsi_DSAppend(&dStr, (m?" ":""), cs->name, NULL);
n++; m++;
}
cs++;
}
csi = (csi?csi->next:NULL);
}
jsi_SortDString(interp, &dStr, " ");
if (varname)
spnam = varname;
else if (interp->lastPushStr && !spnam[0])
spnam = interp->lastPushStr;
Jsi_LogError("'%s' sub-commands are: %s.",
spnam, Jsi_DSValue(&dStr));
Jsi_DSFree(&dStr);
} else {
Jsi_LogError("can not execute expression: '%s' not a function",
varname ? varname : "");
}
} | 138,335,394,861,047,300,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,534 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | char *Jsi_FileRealpath(Jsi_Interp *interp, Jsi_Value *spath, char *newname)
{
char *path = Jsi_ValueString(interp, spath, 0);
if (!path) return NULL;
return Jsi_FileRealpathStr(interp, path, newname);
} | 198,634,675,207,545,300,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,535 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC MySqlErrorNoCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
MySqlObj *jdb;
if (!(jdb = _mysql_getDbHandle(interp, _this, funcPtr))) return JSI_ERROR;
int n = mysql_errno(jdb->db);
Jsi_ValueMakeNumber(interp, ret, (Jsi_Number)n);
return JSI_OK;
} | 280,680,150,371,301,240,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,536 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_ValueGetIndex( Jsi_Interp *interp, Jsi_Value *valPtr,
const char **tablePtr, const char *msg, int flags, int *indexPtr)
{
char *val = Jsi_ValueString(interp, valPtr, NULL);
if (val == NULL)
return Jsi_LogError("expected string");
return Jsi_GetIndex(interp, val, tablePtr, msg, flags, indexPtr);
} | 26,876,058,064,528,927,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,537 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_CommandInvokeJSON(Jsi_Interp *interp, const char *cmdstr, const char *json, Jsi_Value **ret)
{
Jsi_Value *func = Jsi_NameLookup(interp, cmdstr);
if (func)
return Jsi_FunctionInvokeJSON(interp, func, json, ret);
return Jsi_LogError("can not find cmd: %s", cmdstr);
} | 224,852,127,856,908,000,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,538 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | jsonGen1Value(Jsi_Interp *interp, Jsi_JsonParser *p, const char *js, uint i, uint *endPos, int incr)
{
uint len;
const char *t;
Jsi_Value *v = NULL;
switch (p->tokens[i].type) {
case JSI_JTYPE_PRIMITIVE:
t = Jsi_JsonGetTokstr(p, js, i, &len);
if (len == 4 && Jsi_Strncmp(t, "true", len)==0)
v = Jsi_ValueMakeBool(interp, NULL, 1);
else if (len == 5 && Jsi_Strncmp(t, "false", len)==0)
v = Jsi_ValueMakeBool(interp, NULL, 0);
else if (len == 4 && Jsi_Strncmp(t, "null", len)==0)
v = Jsi_ValueMakeNull(interp, NULL);
else if (len == 9 && Jsi_Strncmp(t, "undefined", len)==0)
v = Jsi_ValueMakeNull(interp, NULL);
else {
char *ep;
Jsi_Number d;
d = strtod(t,&ep);
if (ep>(t+len))
Jsi_LogWarn("bad number %*s", len, t);
v = Jsi_ValueMakeNumber(interp, NULL, d);
}
break;
case JSI_JTYPE_STRING:
t = Jsi_JsonGetTokstr(p, js, i, &len);
v = jsonNewStringObj(interp, t, len);
break;
case JSI_JTYPE_ARRAY:
v = jsonGenArray(interp, p, js, i, &i);
i--;
break;
case JSI_JTYPE_OBJECT:
v = jsonGenObject(interp, p, js, i, &i);
i--;
break;
default:
break;
}
if (endPos)
*endPos = i;
if (v == NULL)
v = Jsi_ValueMakeUndef(interp, NULL);
if (incr)
Jsi_IncrRefCount(interp, v);
return v;
} | 205,005,062,082,681,900,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,539 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void Jsi_MutexUnlock(Jsi_Interp *interp, Jsi_Mutex *mtx) { MutexUnlock(mtx); if (interp) interp->lockRefCnt--; } | 18,931,990,154,957,458,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,540 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *make_forin(Jsi_OpCodes *lval, jsi_Pline *line, Jsi_OpCodes *expr, Jsi_OpCodes *stat, const char *label, int isof)
{
Jsi_OpCodes *keycode = code_key();
keycode->codes[0].isof = isof;
keycode->codes[0].Line = line->first_line;
Jsi_OpCodes *init = codes_join(expr, keycode);
Jsi_OpCodes *cond = codes_join3(lval, code_next(),
code_jfalse(stat->code_len + 2));
Jsi_OpCodes *stat_jmp = code_jmp(-(cond->code_len + stat->code_len));
code_reserved_replace(stat, 1, 0, label, 2);
return codes_join3(codes_join(init, cond),
codes_join(stat, stat_jmp), code_pop(2));
} | 263,889,439,335,402,660,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,541 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_Value* mdbEvalSetColumnValue(MyDbEvalContext *p, int iCol, Jsi_Value **val) {
Jsi_Interp *interp = p->jdb->interp;
MysqlPrep *prep = p->prep;
SqlFieldResults *field = prep->fieldResult+iCol;
if (field->isnull)
return Jsi_ValueMakeNull(interp, val);
switch(field->jsiTypeMap) {
case JSI_OPTION_STRING: {
int bytes = field->len;
char *zBlob = field->buffer.vstring;
if( !zBlob ) {
return Jsi_ValueMakeNull(interp, val);
}
zBlob = (char*)Jsi_Malloc(bytes+1);
memcpy(zBlob, field->buffer.vstring, bytes);
zBlob[bytes] = 0;
return Jsi_ValueMakeBlob(interp, val, (unsigned char*)zBlob, bytes+1);
}
case JSI_OPTION_BOOL:
return Jsi_ValueMakeBool(interp, val, field->buffer.vchar);
case JSI_OPTION_INT64:
return Jsi_ValueMakeNumber(interp, val, (Jsi_Number)field->buffer.vlonglong);
//case JSI_OPTION_TIME_T:
case JSI_OPTION_TIME_D:
case JSI_OPTION_TIME_W: {
Jsi_Number jtime = mdbMyTimeToJS(&field->buffer.timestamp);
return Jsi_ValueMakeNumber(interp, val, jtime);
}
case JSI_OPTION_DOUBLE:
return Jsi_ValueMakeNumber(interp, val, (Jsi_Number)field->buffer.vdouble);
default:
Jsi_LogWarn("unknown type: %d", field->jsiTypeMap);
}
return Jsi_ValueNew1(interp);
} | 36,714,575,779,139,300,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,542 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC SqliteFunctionCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
SqlFunc *pFunc;
Jsi_Value *tocall, *nVal;
char *zName;
int rc, nArg = -1, argc;
argc = Jsi_ValueGetLength(interp, args);
Jsi_Db *jdb;
if (!(jdb = dbGetDbHandle(interp, _this, funcPtr))) return JSI_ERROR;
zName = Jsi_ValueArrayIndexToStr(interp, args, 0, NULL);
tocall = Jsi_ValueArrayIndex(interp, args, 1);
if (zName == NULL)
return Jsi_LogError("expected name");
if (!Jsi_ValueIsFunction(interp, tocall))
return Jsi_LogError("expected function");
if (argc == 3) {
nVal = Jsi_ValueArrayIndex(interp, args, 2);
if (Jsi_GetIntFromValue(interp, nVal, &nArg) != JSI_OK)
return JSI_ERROR;
} else {
Jsi_FunctionArguments(interp, tocall, &nArg);
}
if (nArg > SQLITE_LIMIT_FUNCTION_ARG)
return Jsi_LogError("to many args");
/* if( argc==6 ){
const char *z = Jsi_GetString(objv[3]);
int n = Jsi_Strlen(z);
if( n>2 && strncmp(z, "-argcount",n)==0 ){
if( Jsi_GetIntFromObj(interp, objv[4], &nArg) ) return JSI_ERROR;
if( nArg<0 )
return Jsi_LogError( "number of arguments must be non-negative");
}
pScript = objv[5];
}else if( argc!=4 ){
Jsi_WrongNumArgs(interp, 2, objv, "NAME [-argcount N] SCRIPT");
return JSI_ERROR;
}else{
pScript = objv[3];
}*/
pFunc = dbFindSqlFunc(jdb, zName);
if( pFunc==0 ) return JSI_ERROR;
SQLSIGASSERT(pFunc,FUNC);
pFunc->tocall = tocall;
Jsi_IncrRefCount(interp, pFunc->tocall);
rc = sqlite3_create_function(jdb->db, zName, nArg, SQLITE_UTF8,
pFunc, jsiSqlFunc, 0, 0);
if( rc!=SQLITE_OK ) {
rc = JSI_ERROR;
Jsi_LogError("function create error: %s", (char *)sqlite3_errmsg(jdb->db));
}
return JSI_OK;
} | 257,070,271,200,970,500,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,543 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_key() { JSI_NEW_CODES(0,OP_KEY, 0); } | 279,254,828,056,492,150,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,544 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_JSONParse(Jsi_Interp *interp, const char *js, Jsi_Value **ret, int flags)
{
uint i = 0, r;
Jsi_RC result = JSI_OK;
int strict = (flags & JSI_JSON_STRICT);
Jsi_JsonTok *tok;
Jsi_Value *v;
const char *err;
Jsi_Number d;
if (js == NULL)
return JSI_OK;
while (isspace(*js))
js++;
if (js[0] == 0)
return JSI_OK;
switch (js[0]) {
case 't': if (Jsi_Strcmp(js,"true")==0) { if (ret) Jsi_ValueMakeBool(interp, ret, 1); return JSI_OK; } break;
case 'f': if (Jsi_Strcmp(js,"false")==0) { if (ret) Jsi_ValueMakeBool(interp, ret, 0); return JSI_OK; } break;
case 'n': if (Jsi_Strcmp(js,"null")==0) { if (ret) Jsi_ValueMakeNull(interp, ret); return JSI_OK; } break;
case '0': case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9': case '-':
if (Jsi_GetDouble(interp, js, &d) == JSI_OK) { if (ret) Jsi_ValueMakeNumber(interp, ret, d); return JSI_OK; } break;
}
JSI_JSON_DECLARE(pp, tokens, 0);
Jsi_JsonParser *p = &pp;
pp.strict = strict;
pp.flags = flags;
r = Jsi_JsonParse(p, js);
if (r != JSI_JSON_ERR_NONE) {
int ofs = pp.pos, len = Jsi_Strlen(js);
if (ofs<0 || ofs>len)
ofs = 0;
err = p->errStr;
if (!err)
err = Jsi_JsonGetErrname(r);
if (interp)
Jsi_LogError("JSON parse error (%s) at offset %d \"%.30s\"", err, ofs, js+ofs);
result = JSI_ERROR;
goto done;
}
if (!ret)
goto done;
tok = p->tokens;
if (tok->size<=0) {
if (!*ret)
*ret = Jsi_ValueNew1(interp);
if (tok->type == JSI_JTYPE_OBJECT)
Jsi_ValueMakeObject(interp, ret, Jsi_ObjNewObj(interp, NULL, 0));
else if (tok->type == JSI_JTYPE_ARRAY)
Jsi_ValueMakeArrayObject(interp, ret, Jsi_ObjNew(interp));
else
Jsi_ValueMakeUndef(interp, ret);
goto done;
}
v = jsonGen1Value(interp, p, js, i, &i, 1);
Jsi_ValueReplace(interp, ret, v);
Jsi_DecrRefCount(interp, v);
done:
Jsi_JsonFree(&pp);
return result;
} | 137,272,040,135,329,420,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,545 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void* Jsi_Realloc(void *m,unsigned int size) {
void *v = realloc(m,size);
Assert(v);
return v;
} | 38,427,971,973,659,650,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,546 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_Value *ValueNew1(Jsi_Interp *interp)
{
Jsi_Value *v = ValueNew(interp);
Jsi_IncrRefCount(interp, v);
return v;
} | 55,591,815,840,065,990,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,547 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void Jsi_ValueCopy(Jsi_Interp *interp, Jsi_Value *to, Jsi_Value *from ) {
return jsi_ValueCopyMove(interp, to, from, 1);
} | 93,786,864,876,243,240,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,548 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | int Jsi_Close(Jsi_Interp *interp, Jsi_Channel chan) {
if (chan->fsPtr==0 || !chan->fsPtr->closeProc) return -1;
if (chan->flags&JSI_FS_NOCLOSE) return -1;
int rc = chan->fsPtr->closeProc(chan);
if (rc == 0)
Jsi_Free(chan);
return rc;
} | 250,711,029,244,387,900,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,549 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | extern void jsi_TypeMismatch(Jsi_Interp* interp)
{
interp->typeMismatchCnt++;
if (interp->typeWarnMax<=0)
return;
if (interp->typeMismatchCnt>=interp->typeWarnMax) {
memset(&interp->typeCheck, 0, sizeof(interp->typeCheck));
Jsi_LogWarn("Max warnings exceeded %d: typeCheck disabled", interp->typeWarnMax);
}
} | 331,345,746,577,920,630,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,550 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_GetIntFromValueBase(Jsi_Interp* interp, Jsi_Value *value, int *n, int base, int flags)
{
int noMsg = (flags & JSI_NO_ERRMSG);
/* TODO: inefficient to convert to double then back. */
if (!value)
return JSI_ERROR;
Jsi_Number d = Jsi_ValueToNumberInt(interp, value, 1);
if (!Jsi_NumberIsFinite(d))
{
if (!noMsg)
Jsi_LogError("invalid number");
return JSI_ERROR;
}
Jsi_ValueReset(interp,&value);
Jsi_ValueMakeNumber(interp, &value, d);
*n = (int)d;
return JSI_OK;
} | 147,058,284,278,882,660,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,551 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_in() { JSI_NEW_CODES(0,OP_IN, 0); } | 294,647,996,257,121,600,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,552 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void insert_case5(Jsi_TreeEntry* n) {
Jsi_TreeEntry* g = grandparent(n);
set_color(n->parent, _JSI_TREE_BLACK);
set_color(g, _JSI_TREE_RED);
if (n == n->parent->left) {
rotate_right(g);
} else {
Assert (n == n->parent->right);
rotate_left(g);
}
} | 231,214,847,934,231,600,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,553 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC FilesysGetsCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
int len;
UdfGet(udf, _this, funcPtr);
if (!udf->filename) {
Jsi_ValueMakeUndef(interp, ret);
return JSI_OK;
}
char buf[JSI_BUFSIZ];
if (!Jsi_Gets(interp, udf->chan, buf, sizeof(buf))) {
Jsi_ValueMakeUndef(interp, ret);
return JSI_OK;
}
buf[sizeof(buf)-1] = 0;
len = Jsi_Strlen(buf);
if (len > 0 && buf[len-1] == '\n')
buf[len-1] = 0;
Jsi_ValueMakeStringDup(interp, ret, buf);
return JSI_OK;
} | 150,017,272,585,259,960,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,554 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | int Jsi_Chdir(Jsi_Interp *interp, Jsi_Value* path) {
void *data;
int rc = 0;
const char *pathPtr = Jsi_ValueToString(interp, path, NULL);
if (interp->isSafe && Jsi_InterpAccess(interp, path, JSI_INTACCESS_READ) != JSI_OK)
return Jsi_LogError("read access denied");
Jsi_Filesystem *fsPtr = Jsi_FilesystemForPath(interp, path, &data);
if (fsPtr == &jsiFilesystem) {
rc = chdir(pathPtr);
if (rc < 0)
return -1;
/* If change out of native fs, GetCwd will use pwdStr */
fsPtr = NULL;
}
Jsi_DSSetLength(&jsiIntData.pwdStr, 0);
Jsi_DSAppendLen(&jsiIntData.pwdStr, pathPtr, -1);
jsiIntData.cwdFsPtr = fsPtr;
jsiIntData.pwd = fsPtr ? Jsi_DSValue(&jsiIntData.pwdStr) : NULL;
return rc;
} | 101,313,491,543,286,240,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,555 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Channel Jsi_Open(Jsi_Interp *interp, Jsi_Value *file, const char *modeString)
{
/* Find fsys, and use open there. */
Jsi_Filesystem *fsPtr;
Jsi_Chan *ch = NULL;
void *data;
int fnl = 0;
const char *fileName = Jsi_ValueString(interp, file, &fnl), *oldFN = fileName;
if (!fileName || !fnl) {
Jsi_LogError("expected string filename");
return NULL;
}
if (!Jsi_Strcmp(fileName, "stdin")) return jsiIntData.stdChans;
if (!Jsi_Strcmp(fileName, "stdout")) return jsiIntData.stdChans+1;
if (!Jsi_Strcmp(fileName, "stderr")) return jsiIntData.stdChans+2;
const char *s = modeString;
bool quiet = 0;
if (s[0]=='-') {
quiet = true;
s++;
}
char Mode[sizeof(ch->modes)];
Jsi_StatBuf sb;
Jsi_Value *path = NULL;
int n, i, mode = 0, rc, writ, aflag;
if (!s)
s = "r";
if (Jsi_Strlen(s) >= sizeof(ch->modes)) {
Jsi_LogError("mode too long: %s", s);
return NULL;
}
if (Jsi_Strchr(s, 'z') || Jsi_Strchr(s, 'Z')) {
Jsi_Filesystem *fsPtr = jsi_FilesysFind("jfz");
if (!fsPtr) {
Jsi_LogError("compressed files unsupported");
return NULL;
}
ch = fsPtr->openProc(interp, file, s);
if (!ch) {
if (!quiet)
Jsi_LogError("File open failed '%s'", fileName);
return NULL;
}
Jsi_Chan *nch = (Jsi_Chan *)Jsi_Calloc(1,sizeof(*nch));
*nch = *ch;
nch->fsPtr = fsPtr;
return nch;
}
for (i=0, n = 0; s[i]; i++) {
switch (s[i]) {
case '+': break;
case 'b': break;
case 'r': if (!Jsi_Strchr(s,'+')) mode |= JSI_FS_READONLY; break;
case 'a':
case 'w': if (!Jsi_Strchr(s,'+')) mode |= JSI_FS_WRITEONLY; break;
default: Jsi_LogError("unknown mode char: %c", s[i]); return NULL;
}
Mode[n++] = s[i];
}
Mode[n] = 0;
/* Fixup files in the ~ dir */
rc = Jsi_Stat(interp, file,&sb);
if ((rc != 0 || *fileName == '~') && (fileName = Jsi_FileRealpath(interp, file, NULL))) {
path = Jsi_ValueNewString(interp, fileName, -1);
Jsi_IncrRefCount(interp, path);
rc = Jsi_Stat(interp, path, &sb);
if (rc == 0)
file = path;
}
if (!fileName) {
Jsi_LogError("file error: %s", oldFN);
return NULL;
}
if (rc == 0 && sb.st_mode & S_IFDIR )
{
Jsi_LogError("can not open directory: %s", fileName);
goto done;
}
fsPtr = Jsi_FilesystemForPath(interp, file, &data);
writ = (Jsi_Strchr(s,'w') || Jsi_Strchr(s,'a') || Jsi_Strchr(s,'+'));
aflag = (writ ? JSI_INTACCESS_WRITE : JSI_INTACCESS_READ);
if (fsPtr && fsPtr != &jsiFilesystem) {
ch = fsPtr->openProc(interp, file, Mode);
if (ch)
ch->isNative = 0;
else
Jsi_LogError("File open failed '%s'", fileName);
} else {
if (interp->isSafe && ((rc && Jsi_InterpAccess(interp, file, JSI_INTACCESS_CREATE) != JSI_OK)
|| Jsi_InterpAccess(interp, file, aflag) != JSI_OK)) {
Jsi_LogError("%s access denied: %s", writ?"write":"read", fileName);
goto done;
}
FILE *fp = fopen(fileName, Mode);
fsPtr = &jsiFilesystem;
if (!fp) {
if (!quiet)
Jsi_LogError("File open failed '%s'", fileName);
goto done;
}
ch = (Jsi_Chan *)Jsi_Calloc(1,sizeof(*ch));
ch->fp = fp;
ch->isNative = 1;
}
if (ch) {
ch->flags |= mode; // + (zLevel<<24);
Jsi_Strcpy(ch->modes, s);
ch->fsPtr = fsPtr;
ch->fname = fileName;
}
done:
if (path)
Jsi_DecrRefCount(interp, path);
return ch;
} | 146,797,179,360,763,280,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,556 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Value *Jsi_Executable(Jsi_Interp *interp)
{
return jsiIntData.execValue;
} | 66,707,712,426,825,570,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,557 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_TreeEntry* uncle(Jsi_TreeEntry* n) {
Assert (n != NULL);
Assert (n->parent != NULL);
Assert (n->parent->parent != NULL);
return sibling(n->parent);
} | 247,435,923,056,924,800,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,558 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_MapConf(Jsi_Map *mapPtr, Jsi_MapOpts *opts, bool set)
{
switch (mapPtr->typ) {
case JSI_MAP_HASH: return Jsi_HashConf(mapPtr->v.hash, opts, set);
case JSI_MAP_TREE: return Jsi_TreeConf(mapPtr->v.tree, opts, set);
case JSI_MAP_LIST: return Jsi_ListConf(mapPtr->v.list, opts, set);
case JSI_MAP_NONE: break;
}
return JSI_ERROR;
} | 235,576,746,159,051,400,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,559 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC jsi_RegExpValueNew(Jsi_Interp *interp, const char *regtxt, Jsi_Value *ret)
{
Jsi_DString dStr = {};
Jsi_DSAppend(&dStr, "/", regtxt, "/", NULL);
Jsi_Regex *re = Jsi_RegExpNew(interp, Jsi_DSValue(&dStr), 0);
Jsi_DSFree(&dStr);
if (re == NULL)
return JSI_ERROR;
Jsi_Obj *o = Jsi_ObjNewType(interp, JSI_OT_REGEXP);
Jsi_ValueMakeObject(interp, &ret, o);
ret->d.obj->d.robj = re;
ret->d.obj->ot = JSI_OT_REGEXP;
return JSI_OK;
} | 183,713,656,717,594,130,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,560 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void mdbRelease1Stmt( MySqlObj *jdb, MysqlPrep *prep ) {
// TODO: split out parts reusable by cached query.
int i;
if (prep->deleting)
return;
prep->deleting = 1;
if (prep->myStmt)
mysql_stmt_close(prep->myStmt);
if (prep->resultMetaData)
mysql_free_result(prep->resultMetaData);
if (prep->paramMetaData)
mysql_free_result(prep->paramMetaData);
if (prep->bindParam)
Jsi_Free(prep->bindParam);
if (prep->fieldParam)
Jsi_Free(prep->fieldParam);
if (prep->bindResult) {
for (i=0; i<prep->numCol; i++) {
MYSQL_BIND *bind = prep->bindResult+i;
if (bind->buffer_type == MYSQL_TYPE_STRING && bind->buffer)
Jsi_Free(bind->buffer);
}
Jsi_Free(prep->bindResult);
}
if (prep->fieldResult)
Jsi_Free(prep->fieldResult);
if (prep->colTypes)
Jsi_Free(prep->colTypes);
if (prep->colNames)
Jsi_Free(prep->colNames);
if (prep->zSql)
Jsi_Free(prep->zSql);
if (prep->naStr) {
Jsi_Free(prep->origSql);
Jsi_DSFree(prep->naStr);
Jsi_Free(prep->naStr);
}
if (prep->entry)
Jsi_HashEntryDelete(prep->entry);
if (prep->elPtr) {
Jsi_ListEntry *pPtr = prep->elPtr;
prep->elPtr = NULL;
Jsi_ListEntryDelete(pPtr);
}
Jsi_Free(prep);
jdb->numStmts--;
} | 248,662,253,116,827,000,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,561 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC fileObjFree(Jsi_Interp *interp, void *data)
{
FileObj *fo = (FileObj *)data;
SIGASSERT(fo,FILEOBJ);
fileObjErase(fo);
Jsi_Free(fo);
return JSI_OK;
} | 33,617,018,541,778,027,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,562 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | bool Jsi_StrIsAlnum(const char *cp)
{
if (!cp || !*cp) return 0;
while (*cp)
if (isalnum(*cp) || *cp == '_')
cp++;
else
return 0;
return 1;
} | 277,299,909,373,740,380,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,563 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC jsi_InterpDelete(Jsi_Interp *interp, void *ptr) {
if (jsi_vf)
Jsi_DecrRefCount(interp, jsi_vf);
jsi_vf = NULL;
jsi_exitCode = interp->exitCode;
jsi_deleted = 1;
return JSI_OK;
} | 205,278,468,927,616,950,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,564 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_CommandInvoke(Jsi_Interp *interp, const char *cmdstr, Jsi_Value *args, Jsi_Value **ret)
{
Jsi_Value *func = Jsi_NameLookup(interp, cmdstr);
if (func)
return Jsi_FunctionInvoke(interp, func, args, ret, NULL);
return Jsi_LogError("can not find cmd: %s", cmdstr);
} | 156,274,332,161,830,330,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,565 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_LogMsg(Jsi_Interp *interp, uint code, const char *format,...) {
va_list va;
va_start (va, format);
const char *mt = (code <= JSI__LOGLAST ? jsi_LogCodes[code] : "");
fputs(mt, stderr);
vfprintf(stderr, format, va);
fputs("\n", stderr);
va_end(va);
return JSI_ERROR;
} | 85,904,593,397,548,280,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,566 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_jtrue(int off) { JSI_NEW_CODES(0,OP_JTRUE, off); } | 177,993,035,883,971,400,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,567 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | char *Jsi_ValueString(Jsi_Interp *interp, Jsi_Value* v, int *lenPtr)
{
if (!v) return NULL;
Jsi_String *s = jsi_ValueString(v);
if (s) {
if (lenPtr)
*lenPtr = (s->len<0 ? (int)Jsi_Strlen(s->str) : s->len);
return s->str;
}
if (lenPtr)
*lenPtr = 0;
return NULL;
} | 226,334,669,066,379,640,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,568 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Value* Jsi_ValueMakeBool(Jsi_Interp *interp, Jsi_Value **vPtr, int b) {
Jsi_Value *v = (vPtr?*vPtr:NULL);
if (!v)
v = Jsi_ValueNew(interp);
else
Jsi_ValueReset(interp, vPtr);
v->vt = JSI_VT_BOOL;
v->d.val = b;
return v;
} | 106,632,175,313,976,260,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,569 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static int jsi_FSRemoveProc(Jsi_Interp *interp, Jsi_Value* path, int flags) {
const char *pathPtr = Jsi_ValueToString(interp, path, NULL);
Jsi_DString dStr = {};
if (*pathPtr == '~')
pathPtr = jsi_TildePath(interp, pathPtr, &dStr);
int rc = remove(pathPtr);
Jsi_DSFree(&dStr);
return rc;
} | 219,826,055,075,537,630,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,570 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void* Jsi_MapValueGet(Jsi_MapEntry *h){
switch (jsi_GetListType(h)) {
case JSI_MAP_HASH: return Jsi_HashValueGet((Jsi_HashEntry*)h);
case JSI_MAP_TREE: return Jsi_TreeValueGet((Jsi_TreeEntry*)h);
case JSI_MAP_LIST: return Jsi_ListValueGet((Jsi_ListEntry*)h);
case JSI_MAP_NONE: break;
}
return NULL;
} | 144,339,870,779,337,120,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,571 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void rotate_right(Jsi_TreeEntry* n) {
Jsi_TreeEntry* l;
Assert(n);
l = n->left;
replace_node(n, l);
n->left = l->right;
if (l->right != NULL) {
l->right->parent = n;
}
l->right = n;
n->parent = l;
} | 205,827,213,862,092,250,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,572 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC StringMatchCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
int sLen, bLen;
const char *source_str;
ChkString(_this, funcPtr, source_str, &sLen, &bLen);
const char *v = source_str;
Jsi_Value *seq = Jsi_ValueArrayIndex(interp, args, skip);
if (Jsi_ValueIsString(interp, seq)) {
char *cp = Jsi_ValueString(interp, seq, NULL);
if (jsi_RegExpValueNew(interp, cp, seq) != JSI_OK)
return JSI_ERROR;
}
/* TODO: differentiate from re.exec() */
return jsi_RegExpMatches(interp, seq, v, bLen, *ret, NULL, 1);
} | 192,099,267,428,699,100,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,573 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_etry(jsi_Pstate *p, jsi_Pline *line) { JSI_NEW_CODESLN(0,OP_ETRY, 0); } | 304,918,820,804,572,720,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,574 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC jsi_wsDelPss(Jsi_Interp *interp, void *data) {
Jsi_Free(data);
return JSI_OK;
} | 134,655,279,357,266,420,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,575 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_TreeEntry* grandparent(Jsi_TreeEntry* n) {
Assert (n != NULL);
Assert (n->parent != NULL);
Assert (n->parent->parent != NULL);
return n->parent->parent;
} | 153,292,797,700,092,720,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,576 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void Jsi_SplitStr(const char *str, int *argcPtr,
char ***argvPtr, const char *ch, Jsi_DString *dStr)
{
char *cp, *ep, *p, **argv;
int cnt = 1, len, i, clen;
if (!ch)
ch = "";
clen = Jsi_Strlen(ch);
if (clen<=0)
return SplitChar(str, argcPtr, argvPtr, *ch, dStr);
len = Jsi_Strlen(str);
cp = (char*)str;
while (*cp) {
cp = Jsi_Strstr(cp,ch);
if (cp == NULL || *cp == 0) break;
cp += clen;
cnt++;
}
//argv = (char**)Jsi_Calloc(1,(sizeof(char*)*(cnt+3) + sizeof(char)*(len+6)));
Jsi_DSSetLength(dStr, (sizeof(char*)*(cnt+3) + sizeof(char)*(len+6)));
argv = (char**)Jsi_DSValue(dStr);
*argvPtr = argv;
*argcPtr = cnt;
p = (char*)&(argv[cnt+2]);
argv[cnt+1] = p;
Jsi_Strcpy(p, str);
cp = p;
i = 0;
argv[i++] = p;
while (*cp) {
ep = Jsi_Strstr(cp,ch);
if (ep == NULL || *ep == 0) break;
*ep = 0;
cp = ep+clen;
argv[i++] = cp;
}
argv[cnt] = NULL;
} | 208,993,798,416,405,800,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,577 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_JSONQuote(Jsi_Interp *interp, const char *str, int len, Jsi_DString *dsPtr)
{
const char *cp = str;
int i = 0;
if (len<0)
len = Jsi_Strlen(str);
char cbuf[10];
Jsi_DSAppend(dsPtr,"\"",NULL);
while (*cp && i++<len) {
if (*cp == '\\' /* || *cp == '/' */ || *cp == '\"') {
cbuf[0] = '\\';
cbuf[1] = *cp;
cbuf[2] = 0;
Jsi_DSAppend(dsPtr,cbuf,NULL);
} else if (!isprint(*cp)) {
int ilen;
switch (*cp) {
case '\b': Jsi_DSAppend(dsPtr,"\\b",NULL); break;
case '\n': Jsi_DSAppend(dsPtr,"\\n",NULL); break;
case '\r': Jsi_DSAppend(dsPtr,"\\r",NULL); break;
case '\f': Jsi_DSAppend(dsPtr,"\\f",NULL); break;
case '\t': Jsi_DSAppend(dsPtr,"\\t",NULL); break;
default:
if ((ilen = Jsi_UtfEncode(cp, cbuf))) {
Jsi_DSAppend(dsPtr,cbuf,NULL);
cp += (ilen-1);
}
}
} else {
cbuf[0] = *cp;
cbuf[1] = 0;
Jsi_DSAppend(dsPtr,cbuf,NULL);
}
cp++;
}
Jsi_DSAppend(dsPtr,"\"", NULL);
return Jsi_DSValue(dsPtr);;
} | 187,652,617,057,463,670,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,578 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void jsi_DebugDumpValues(Jsi_Interp *interp)
{
if (jsiIntData.mainInterp != interp) return;
int vdLev = interp->memDebug;
int have = (interp->dbPtr->valueDebugTbl->numEntries || interp->dbPtr->objDebugTbl->numEntries);
if ((have && vdLev>0) || vdLev>=3) {
// First traverse all Object trees/arrays and mark all values contained therein.
Jsi_HashSearch search;
Jsi_HashEntry *hPtr;
for (hPtr = Jsi_HashSearchFirst(interp->dbPtr->objDebugTbl, &search);
hPtr != NULL; hPtr = Jsi_HashSearchNext(&search)) {
Jsi_Obj *vp = (Jsi_Obj *)Jsi_HashKeyGet(hPtr);
if (vp!=NULL && vp->sig == JSI_SIG_OBJ) {
jsiFlagDebugValues(interp, vp);
}
}
if (interp->dbPtr->valueDebugTbl->numEntries != interp->dbPtr->valueCnt)
fprintf(stderr, "\n\nValues table/alloc mismatch: table=%d, alloc=%d\n",
interp->dbPtr->valueDebugTbl->numEntries, interp->dbPtr->valueCnt);
// Dump unfreed values and objs.
int refSum=0, refsum=0;
int bcnt[4] = {};
if (vdLev>1 && interp->dbPtr->valueDebugTbl->numEntries)
fprintf(stderr, "\n\nUNFREED VALUES \"[*ptr,#refCnt,type,idx:label,label2]: @file:line in func() ...\"\n");
for (hPtr = Jsi_HashSearchFirst(interp->dbPtr->valueDebugTbl, &search);
hPtr != NULL; hPtr = Jsi_HashSearchNext(&search)) {
Jsi_Value *vp = (Jsi_Value *)Jsi_HashKeyGet(hPtr);
if (vp==NULL || vp->sig != JSI_SIG_VALUE) {
bcnt[0]++;
if (vdLev>1)
fprintf(stderr, "BAD VALUE: %p\n", vp);
} else {
bcnt[1]++;
refSum += vp->refCnt;
if (vdLev>1) {
char ebuf[JSI_BUFSIZ], ebuf2[JSI_MAX_NUMBER_STRING];
ebuf[0] = 0;
if (vp->vt==JSI_VT_OBJECT)
snprintf(ebuf, sizeof(ebuf), " {obj=%p, otype=%s}", vp->d.obj, Jsi_ObjTypeStr(interp, vp->d.obj));
else if (vp->vt==JSI_VT_NUMBER)
snprintf(ebuf, sizeof(ebuf), " {num=%s}", Jsi_NumberToString(interp, vp->d.num, ebuf2, sizeof(ebuf2)));
else if (vp->vt==JSI_VT_BOOL)
snprintf(ebuf, sizeof(ebuf), " {bool=%s}", vp->d.val?"true":"false");
else if (vp->vt==JSI_VT_STRING) {
const char *sbuf = ((vp->d.s.str && Jsi_Strlen(vp->d.s.str)>40)?"...":"");
snprintf(ebuf, sizeof(ebuf), " {string=\"%.40s%s\"}", (vp->d.s.str?vp->d.s.str:""), sbuf);
}
const char *pfx = "";
if (!(vp->VD.flags&MDB_INOBJ))
pfx = "!"; // Value is not contained in an object.
fprintf(stderr, "[%s*%p,#%d,%s,%d:%s%s%s]:%s @%s:%d in %s()%s\n", pfx,
vp, vp->refCnt, Jsi_ValueTypeStr(interp, vp), vp->VD.Idx,
(vp->VD.label?vp->VD.label:""), (vp->VD.label2?":":""),
(vp->VD.label2?vp->VD.label2:""), vp->VD.interp==jsiIntData.mainInterp?"":"!",
vp->VD.fname, vp->VD.line, vp->VD.func, ebuf);
}
}
}
if (interp->dbPtr->objDebugTbl->numEntries != interp->dbPtr->objCnt)
fprintf(stderr, "\n\nObject table/alloc mismatch: table=%d, alloc=%d\n",
interp->dbPtr->objDebugTbl->numEntries, interp->dbPtr->objCnt);
if (vdLev>1 && interp->dbPtr->objDebugTbl->numEntries)
fprintf(stderr, "\n\nUNFREED OBJECTS \"[*ptr,#refCnt,type,idx:label,label2]: @file:line in func() ...\"\n");
for (hPtr = Jsi_HashSearchFirst(interp->dbPtr->objDebugTbl, &search);
hPtr != NULL; hPtr = Jsi_HashSearchNext(&search)) {
Jsi_Obj *vp = (Jsi_Obj *)Jsi_HashKeyGet(hPtr);
if (vp==NULL || vp->sig != JSI_SIG_OBJ) {
bcnt[2]++;
fprintf(stderr, "BAD OBJ: %p\n", vp);
} else {
bcnt[3]++;
refsum += vp->refcnt;
if (vdLev>1) {
char ebuf[JSI_BUFSIZ], ebuf2[JSI_MAX_NUMBER_STRING];
ebuf[0] = 0;
if (vp->ot==JSI_OT_OBJECT) {
if (vp->isarrlist)
snprintf(ebuf, sizeof(ebuf), "tree#%d, array#%d", (vp->tree?vp->tree->numEntries:0), vp->arrCnt);
else
snprintf(ebuf, sizeof(ebuf), "tree#%d", (vp->tree?vp->tree->numEntries:0));
} else if (vp->ot==JSI_OT_NUMBER)
snprintf(ebuf, sizeof(ebuf), "num=%s", Jsi_NumberToString(interp, vp->d.num, ebuf2, sizeof(ebuf2)));
else if (vp->ot==JSI_OT_BOOL)
snprintf(ebuf, sizeof(ebuf), "bool=%s", vp->d.val?"true":"false");
else if (vp->ot==JSI_OT_STRING) {
const char *sbuf = ((vp->d.s.str && Jsi_Strlen(vp->d.s.str)>40)?"...":"");
snprintf(ebuf, sizeof(ebuf), "string=\"%.40s%s\"", (vp->d.s.str?vp->d.s.str:""), sbuf);
}
fprintf(stderr, "[*%p,#%d,%s,%d:%s%s%s]:%s @%s:%d in %s() {%s}\n",
vp, vp->refcnt, Jsi_ObjTypeStr(interp, vp), vp->VD.Idx, vp->VD.label?vp->VD.label:"",
vp->VD.label2?":":"",vp->VD.label2?vp->VD.label2:"", vp->VD.interp==jsiIntData.mainInterp?"":"!",
vp->VD.fname, vp->VD.line,
vp->VD.func, ebuf);
}
}
}
fprintf(stderr, "\nVALUES: bad=%d,unfreed=%d,allocs=%d,refsum=%d | OBJECTS: bad=%d,unfreed=%d,allocs=%d,refsum=%d interp=%p\n",
bcnt[0], bcnt[1], interp->dbPtr->valueAllocCnt, refSum, bcnt[2], bcnt[3], interp->dbPtr->objAllocCnt, refsum, interp);
if (interp->codesTbl)
for (hPtr = Jsi_HashSearchFirst(interp->codesTbl, &search);
hPtr != NULL; hPtr = Jsi_HashSearchNext(&search)) {
Jsi_OpCodes *vp = (Jsi_OpCodes *)Jsi_HashKeyGet(hPtr);
fprintf(stderr, "unfreed opcodes: %d\n", vp->id);
}
}
Jsi_HashDelete(interp->dbPtr->valueDebugTbl);
Jsi_HashDelete(interp->dbPtr->objDebugTbl);
Jsi_HashDelete(interp->codesTbl);
bool isMainInt = (interp == jsiIntData.mainInterp);
if (isMainInt && vdLev>3)
_exit(1); // Avoid sanitize output.
} | 108,175,171,380,551,600,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,579 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC MySqlInfoCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
MySqlObj *jdb;
if (!(jdb = _mysql_getDbHandle(interp, _this, funcPtr))) return JSI_ERROR;
Jsi_Obj *nobj = Jsi_ObjNew(interp);
Jsi_ValueMakeObject(interp, ret, nobj);
const char *str, *svals[20];
int i = 0;
svals[i++] = "clientInfo";
svals[i++] = mysql_get_client_info();
svals[i++] = "hostInfo";
svals[i++] = mysql_get_host_info(jdb->db);
svals[i++] = "serverInfo";
svals[i++] = mysql_get_server_info(jdb->db);
svals[i++] = "stat";
svals[i++] = mysql_stat(jdb->db);
svals[i++] = 0;
i = 0;
while (svals[i]) {
str = svals[i+1];
Jsi_ObjInsert(interp, nobj, svals[i], str?Jsi_ValueNewStringDup(interp, str):Jsi_ValueNewNull(interp), 0);
}
Jsi_ObjInsert(interp, nobj, "threadId", Jsi_ValueNewNumber(interp, (Jsi_Number)mysql_thread_id(jdb->db)), 0);
Jsi_ObjInsert(interp, nobj, "protocolVersion", Jsi_ValueNewNumber(interp, (Jsi_Number)mysql_get_proto_info(jdb->db)), 0);
Jsi_ObjInsert(interp, nobj, "clientVersion", Jsi_ValueNewNumber(interp, (Jsi_Number)mysql_get_client_version()), 0);
Jsi_ObjInsert(interp, nobj, "serverVersion", Jsi_ValueNewNumber(interp, (Jsi_Number)mysql_get_server_version(jdb->db)), 0);
Jsi_ObjInsert(interp, nobj, "warningCount", Jsi_ValueNewNumber(interp, (Jsi_Number)mysql_warning_count(jdb->db)), 0);
return JSI_OK;
} | 9,044,665,521,687,056,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,580 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void Jsi_StackFree(Jsi_Stack *stack)
{
Jsi_Free(stack->vector);
Jsi_Free(stack);
} | 337,714,094,108,780,180,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,581 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Value* Jsi_ValueMakeStringKey(Jsi_Interp *interp, Jsi_Value **vPtr, const char *s) {
Jsi_Value *v = (vPtr?*vPtr:NULL);
if (!v)
v = Jsi_ValueNew(interp);
else
Jsi_ValueReset(interp, vPtr);
v->vt = JSI_VT_STRING;
v->d.s.str = (char*)Jsi_KeyAdd(interp,s);
v->d.s.len = Jsi_Strlen(s);
v->f.bits.isstrkey = 1;
return v;
} | 233,629,768,531,224,200,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,582 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_push_func(jsi_Pstate *p, jsi_Pline *line, Jsi_Func *fun) {
Jsi_OpCodes* codes = code_push_func_sub(p, line, fun);
if (codes && fun && fun->name)
codes->codes[0].local = 1;
return codes;
} | 294,281,877,623,073,350,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,583 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void jsi_ValueDebugLabel_(jsi_ValueDebug *vd, const char *l1, const char *l2)
{
if (l1)
vd->label = l1;
if (l2)
vd->label2 = l2;
} | 202,697,453,584,379,900,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,584 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_lessequ() { JSI_NEW_CODES(0,OP_LESSEQU, 0); } | 294,622,260,965,927,300,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,585 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Func *jsi_FuncNew(Jsi_Interp *interp)
{
Jsi_Func *func = (Jsi_Func*)Jsi_Calloc(1, sizeof(Jsi_Func));
SIGINIT(func, FUNC);
func->hPtr = Jsi_HashSet(interp->funcsTbl, func, func);
func->refCnt = 1;
interp->funcCnt++;
return func;
} | 156,100,200,594,383,220,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,586 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code__fcall(jsi_Pstate *p, jsi_Pline *line, int argc, const char *name, const char *namePre, Jsi_OpCodes *argCodes) {
jsi_FuncCallCheck(p,line,argc,1, name, namePre, argCodes);JSI_NEW_CODESLN(0,OP_FCALL, argc);
} | 19,708,855,794,097,857,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,587 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void jsi_InitLocalVar(Jsi_Interp *interp, Jsi_Value *arguments, Jsi_Func *who)
{
SIGASSERTV(who, FUNC);
if (who->localnames) {
int i;
for (i = 0; i < who->localnames->count; ++i) {
const char *argkey = jsi_ScopeStrsGet(who->localnames, i);
if (argkey) {
DECL_VALINIT(key);// = VALINIT;
Jsi_Value *v __attribute__((unused));
Jsi_Value *kPtr = &key; // Note: a string key so no reset needed.
Jsi_ValueMakeStringKey(interp, &kPtr, argkey);
v = jsi_ValueObjKeyAssign(interp, arguments, kPtr, NULL, JSI_OM_DONTENUM);
jsi_ValueDebugLabel(v, "locals", who->name);
}
}
}
} | 87,739,451,415,154,990,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,588 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC NumberIsIntegerCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr) {
return jsi_NumberIsFiniteCmd(interp, args, _this, ret, funcPtr, 2);
} | 290,832,081,335,948,420,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,589 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void jsi_PstateAddVar(jsi_Pstate *ps, jsi_Pline *line, const char *str)
{
Jsi_Interp *interp = ps->interp;
int i;
if (interp->scopes[interp->cur_scope] == NULL)
interp->scopes[interp->cur_scope] = (Jsi_ScopeStrs *)jsi_ScopeStrsNew();
for (i = 0; i < interp->scopes[interp->cur_scope]->count; ++i) {
if (Jsi_Strcmp(str, interp->scopes[interp->cur_scope]->args[i].name) == 0) {
Jsi_Interp *interp = ps->interp;
if (interp && interp->strict) {
interp->parseLine = line;
Jsi_LogWarn("duplicate var: %s", str);
interp->parseLine = NULL;
}
return;
}
}
jsi_ScopeStrsPush(ps->interp, interp->scopes[interp->cur_scope], str, JSI_VT_UNDEF);
} | 238,419,175,286,725,100,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,590 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_FunctionInvokeString(Jsi_Interp *interp, Jsi_Value *func, Jsi_Value *arg, Jsi_DString *dStr)
{
if (interp->deleting)
return JSI_ERROR;
Jsi_Value *vpargs, *frPtr = Jsi_ValueNew1(interp);
Jsi_RC rc;
if (!arg) {
if (!interp->nullFuncArg) {
interp->nullFuncArg = Jsi_ValueMakeObject(interp, NULL, Jsi_ObjNewArray(interp, NULL, 0, 0));
Jsi_IncrRefCount(interp, interp->nullFuncArg);
}
vpargs = interp->nullFuncArg;
} else {
vpargs = Jsi_ValueMakeObject(interp, NULL, Jsi_ObjNewArray(interp, &arg, 1, 1));
}
Jsi_IncrRefCount(interp, vpargs);
rc = Jsi_FunctionInvoke(interp, func, vpargs, &frPtr, NULL);
Jsi_DecrRefCount(interp, vpargs);
if (rc != JSI_OK)
Jsi_LogError("function call failed");
else
Jsi_ValueGetDString(interp, frPtr, dStr, 0);
Jsi_DecrRefCount(interp, frPtr);
return rc;
} | 83,240,337,059,701,820,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,591 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Value *jsi_GlobalContext(Jsi_Interp *interp)
{
return interp->csc;
} | 170,307,594,673,209,160,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,592 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void jsi_wsPathAlias(Jsi_Interp *interp, jsi_wsCmdObj *cmdPtr, const char **inPtr, Jsi_DString *dStr) {
const char *ce, *cp = NULL;
char *lcp;
Jsi_Value *val;
if (cmdPtr->pathAliases) {
cp = *inPtr;
if (*cp == '/') cp++;
if ((ce = Jsi_Strchr(cp, '/'))) {
int len = ce-cp;
Jsi_DSSetLength(dStr, 0);
Jsi_DSAppendLen(dStr, cp, len);
cp = Jsi_DSValue(dStr);
if ((val = Jsi_ValueObjLookup(interp, cmdPtr->pathAliases, cp, 0)) &&
(cp = Jsi_ValueString(interp, val, NULL))) {
*inPtr += (len+2);
cmdPtr->curRoot = cp;
return;
}
}
}
if (!Jsi_Strncmp(*inPtr, "/jsi/", 5)) {
// Get/cache path for system load file, eg /zvfs/lib/Jsish.jsi.
if (!(cp = cmdPtr->jsishPathCache)) {
Jsi_PkgRequire(interp, "Jsish", 0);
if (Jsi_PkgVersion(interp, "Jsish", &cp)>=0)
cmdPtr->jsishPathCache = cp;
}
if (cp) {
Jsi_DSSetLength(dStr, 0);
Jsi_DSAppend(dStr, cp, NULL);
cp = Jsi_DSValue(dStr);
if ((lcp = Jsi_Strrchr(cp, '/'))) {
*lcp = 0;
*inPtr += 5;
cmdPtr->curRoot = cp;
}
}
}
} | 250,601,273,315,645,830,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,593 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC WebSocketFileCmd(Jsi_Interp *interp, Jsi_Value *args, Jsi_Value *_this,
Jsi_Value **ret, Jsi_Func *funcPtr)
{
jsi_wsCmdObj *cmdPtr = (jsi_wsCmdObj*)Jsi_UserObjGetData(interp, _this, funcPtr);
if (!cmdPtr)
return Jsi_LogError("Apply to non-websock object");
Jsi_Value *val = Jsi_ValueArrayIndex(interp, args, 0);
if (val)
return jsi_wsFileAdd(interp, cmdPtr, val);
if (cmdPtr->fileHash)
return Jsi_HashKeysDump(interp, cmdPtr->fileHash, ret, 0);
return JSI_OK;
} | 32,763,329,504,923,447,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,594 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_InitWebSocket(Jsi_Interp *interp, int release)
{
if (release)
return Jsi_DoneWebSocket(interp);
#ifdef LWS_OPENSSL_SUPPORT
Jsi_InterpAccess(interp, NULL, JSI_INTACCESS_SETSSL );
#endif
Jsi_Hash *wsys;
const char *libver = lws_get_library_version();
int lvlen = sizeof(LWS_LIBRARY_VERSION)-1;
if (Jsi_Strncmp(libver, LWS_LIBRARY_VERSION, lvlen) || !isspace(libver[lvlen]))
return Jsi_LogError("Library version mismatch: HDR:%s != LIB:%s", LWS_LIBRARY_VERSION, libver);
#if JSI_USE_STUBS
if (Jsi_StubsInit(interp, 0) != JSI_OK)
return JSI_ERROR;
#endif
Jsi_Value *info = Jsi_ValueNew1(interp);
Jsi_JSONParseFmt(interp, &info, "{libVer:\"%s\", hdrVer:\"%s\", pkgVer:%d}",
libver, LWS_LIBRARY_VERSION, jsi_WsPkgVersion);
Jsi_PkgOpts wsPkgOpts = { wsObjCmd_Specs, &wsObjCmd, websockCmds, info };
Jsi_RC rc = Jsi_PkgProvideEx(interp, "WebSocket", jsi_WsPkgVersion, Jsi_InitWebSocket, &wsPkgOpts);
Jsi_DecrRefCount(interp, info);
if (rc != JSI_OK)
return JSI_ERROR;
if (!(wsys = Jsi_UserObjRegister(interp, &websockobject))) {
Jsi_LogBug("Can not init webSocket");
return JSI_ERROR;
}
if (!Jsi_CommandCreateSpecs(interp, websockobject.name, websockCmds, wsys, JSI_CMDSPEC_ISOBJ))
return JSI_ERROR;
return JSI_OK;
} | 155,164,390,939,066,140,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,595 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Value* Jsi_ValueNewNull(Jsi_Interp *interp) {
Jsi_Value *v = Jsi_ValueNew(interp);
v->vt = JSI_VT_NULL;
return v;
} | 173,637,534,896,453,460,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,596 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC _object_get_callback(Jsi_Tree *tree, Jsi_TreeEntry *hPtr, void *data)
{
Jsi_Value *v;
objwalker *ow = (objwalker *)data;
Jsi_DString *dStr = ow->dStr;
int len;
char *str;
if ((hPtr->f.bits.dontenum))
return JSI_OK;
v =(Jsi_Value*) Jsi_TreeValueGet(hPtr);
if ((ow->quote&JSI_OUTPUT_JSON) && v && v->vt == JSI_VT_UNDEF)
return JSI_OK;
str = (char*)Jsi_TreeKeyGet(hPtr);
char *cp = Jsi_DSValue(dStr);
len = Jsi_DSLength(dStr);
if (len>=2 && (cp[len-2] != '{' || cp[len-1] == '}'))
Jsi_DSAppend(dStr, ", ", NULL);
if (((ow->quote&JSI_OUTPUT_JSON) == 0 || (ow->quote&JSI_JSON_STRICT) == 0) && Jsi_StrIsAlnum(str)
&& !Jsi_HashEntryFind(tree->opts.interp->lexkeyTbl, str))
Jsi_DSAppend(dStr, str, NULL);
else
/* JSON/spaces, etc requires quoting the name. */
Jsi_DSAppend(dStr, "\"", str, "\"", NULL);
Jsi_DSAppend(dStr, ":", NULL);
ow->depth++;
Jsi_RC rc = jsiValueGetString(tree->opts.interp, v, dStr, ow);
ow->depth--;
return rc;
} | 257,289,150,557,638,070,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,597 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void delete_case4(Jsi_TreeEntry* n) {
Jsi_TreeEntry* s = sibling(n);
if (node_color(n->parent) == _JSI_TREE_RED &&
node_color(s) == _JSI_TREE_BLACK &&
node_color(s->left) == _JSI_TREE_BLACK &&
node_color(s->right) == _JSI_TREE_BLACK)
{
set_color(s, _JSI_TREE_RED);
set_color(n->parent, _JSI_TREE_BLACK);
}
else
delete_case5(n);
} | 151,223,423,954,812,840,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,598 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Value * jsi_ValueNew1(Jsi_Interp *interp, const char *fname, int line, const char *func) {
Jsi_Value *v = ValueNew1(interp);
jsi_ValueDebugUpdate(interp, v, valueDebugTbl, fname, line, func);
return v;
} | 205,801,096,866,066,470,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,599 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static char *get_inputline(Jsi_Interp *interp, int istty, const char *prompt)
{
char *res;
#ifdef JSI_HAS_READLINE
if (istty && interp->subOpts.noReadline==0) {
res = jsi_sh_readline(prompt);
if (res && *res) jsi_sh_add_history(res);
return res;
}
#endif
int done = 0;
char bbuf[JSI_BUFSIZ];
Jsi_DString dStr = {};
if (istty)
fputs(prompt, stdout);
fflush(stdout);
while (!done) { /* Read a line. */
bbuf[0] = 0;
if (fgets(bbuf, sizeof(bbuf), stdin) == NULL)
return NULL;
Jsi_DSAppend(&dStr, bbuf, NULL);
if (Jsi_Strlen(bbuf) < (sizeof(bbuf)-1) || bbuf[sizeof(bbuf)-1] == '\n')
break;
}
res = Jsi_Strdup(Jsi_DSValue(&dStr));
Jsi_DSFree(&dStr);
return res;
} | 112,007,251,298,571,860,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,600 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_neg() { JSI_NEW_CODES(0,OP_NEG, 0); } | 38,652,358,436,585,433,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,601 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_HashEntryDelete(Jsi_HashEntry *entryPtr)
{
Jsi_HashEntry *prevPtr;
Jsi_HashEntry **bucketPtr;
size_t hindex;
Jsi_Hash *tablePtr = entryPtr->tablePtr;
Jsi_Interp *interp = tablePtr->opts.interp;
JSI_NOTUSED(interp);
int cnt = 0;
#ifdef JSI_HAS_SIG_HASHENTRY
SIGASSERT(entryPtr, HASHENTRY);
#endif
if (tablePtr->opts.lockHashProc && (*tablePtr->opts.lockHashProc)(tablePtr, 1) != JSI_OK)
return 0;
if (tablePtr->keyType == JSI_KEYS_ONEWORD) {
hindex = RANDOM_INDEX(tablePtr, (const void *)entryPtr->hval);
} else {
hindex = (entryPtr->hval & tablePtr->mask);
}
bucketPtr = tablePtr->buckets + hindex;
if (*bucketPtr == entryPtr) {
*bucketPtr = entryPtr->nextPtr;
cnt++;
} else {
for (prevPtr = *bucketPtr; /*empty*/; prevPtr = prevPtr->nextPtr) {
if (prevPtr == NULL) {
Jsi_LogBug("malformed bucket chain in Jsi_HashEntryDelete");
}
if (prevPtr->nextPtr == entryPtr) {
prevPtr->nextPtr = entryPtr->nextPtr;
cnt++;
break;
}
}
}
if (tablePtr->opts.freeHashProc && entryPtr->clientData)
(tablePtr->opts.freeHashProc)(tablePtr->opts.interp, entryPtr, entryPtr->clientData);
if (tablePtr->opts.lockHashProc)
(*tablePtr->opts.lockHashProc)(tablePtr, 0);
tablePtr->numEntries--;
Jsi_Free(entryPtr);
return cnt;
} | 331,450,925,017,520,160,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,602 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC dbEvalStep(DbEvalContext *p) {
while( p->zSql[0] || p->pPreStmt ) {
Jsi_RC rc;
if( p->pPreStmt==0 ) {
rc = dbPrepareAndBind(p->jdb, p->zSql, &p->zSql, &p->pPreStmt);
if( rc!=JSI_OK ) return rc;
}
rc = dbEvalStepSub(p, 1, NULL);
if (rc != JSI_BREAK)
return rc;
}
/* Finished */
return JSI_BREAK;
} | 208,480,620,739,879,160,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,603 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void dbTraceHandler(void *cd, const char *zSql)
{
int rc;
Jsi_Db *jdb = (Jsi_Db*)cd;
Jsi_Value *vpargs, *items[2] = {}, *ret;
Jsi_Interp *interp = jdb->interp;
items[0] = Jsi_ValueNewObj(interp, jdb->fobj);
items[1] = Jsi_ValueMakeStringDup(interp, NULL, zSql);
vpargs = Jsi_ValueMakeObject(interp, NULL, Jsi_ObjNewArray(interp, items, 2, 0));
Jsi_IncrRefCount(interp, vpargs);
ret = Jsi_ValueNew1(interp);
rc = Jsi_FunctionInvoke(interp, jdb->onTrace, vpargs, &ret, NULL);
Jsi_DecrRefCount(interp, vpargs);
Jsi_DecrRefCount(interp, ret);
if (rc != JSI_OK)
jdb->errCnt++;
} | 120,061,873,943,157,450,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,604 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static int jsi_FSTellProc(Jsi_Channel chan) { return ftell(_JSI_GETFP(chan,1));} | 330,084,039,795,596,000,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,605 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_GetBoolFromValue(Jsi_Interp* interp, Jsi_Value *value, bool *n)
{
if (!value)
return JSI_ERROR;
if (value->vt == JSI_VT_BOOL) {
*n = value->d.val;
return JSI_OK;
}
if (value->vt == JSI_VT_OBJECT && value->d.obj->ot == JSI_OT_BOOL) {
*n = value->d.obj->d.val;
return JSI_OK;
}
Jsi_LogError("invalid bool");
return JSI_ERROR;
} | 158,017,210,937,315,730,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,606 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static void jsi_restore_scope(Jsi_Interp* interp, jsi_Pstate *ps, jsi_TryList* trylist,
jsi_ScopeChain **scope, Jsi_Value **currentScope, int *context_id) {
/* JSI_RESTORE_SCOPE(scope_save, curscope_save)*/
if (*scope != (trylist->scope_save)) {
jsi_ScopeChainFree(interp, *scope);
*scope = (trylist->scope_save);
interp->framePtr->ingsc = *scope;
}
if (*currentScope != (trylist->curscope_save)) {
Jsi_DecrRefCount(interp, *currentScope);
*currentScope = (trylist->curscope_save);
interp->framePtr->incsc = *currentScope;
}
*context_id = ps->_context_id++;
} | 225,021,645,274,506,560,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,607 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static int jsi_FSRewindProc(Jsi_Channel chan) { rewind(_JSI_GETFP(chan,1)); return 0;} | 189,010,715,600,014,400,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,608 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_Value* Jsi_ValueMakeNull(Jsi_Interp *interp, Jsi_Value **vPtr) {
Jsi_Value *v = (vPtr?*vPtr:NULL);
if (!v)
v = Jsi_ValueNew(interp);
else
Jsi_ValueReset(interp, vPtr);
v->vt = JSI_VT_NULL;
return v;
} | 78,414,794,686,006,120,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,609 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_OpCodes *code_sub() { JSI_NEW_CODES(0,OP_SUB, 0); } | 246,823,202,087,023,700,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,610 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | int Jsi_Chmod(Jsi_Interp *interp, Jsi_Value* path, int mode) {
void *data;
Jsi_Filesystem *fsPtr = Jsi_FilesystemForPath(interp, path, &data);
if (fsPtr == NULL || !fsPtr->chmodProc) return -1;
return fsPtr->chmodProc(interp, path, mode);
} | 289,977,297,644,333,450,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,611 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | int Jsi_OptionsProcessJSON(Jsi_Interp *interp, Jsi_OptionSpec *opts, void *data, const char *json, Jsi_Wide flags)
{
uint i = 0, r, len;
Jsi_RC rc = JSI_OK;
int result = 0;
int strict = (flags & JSI_JSON_STRICT);
Jsi_JsonTok *tok;
const char *err;
Jsi_Value *v = NULL;
Jsi_DString nStr;
const char *t, *name = NULL;
if (json == NULL)
return 0;
while (isspace(*json))
json++;
if (json[0] == 0)
return 0;
JSI_JSON_DECLARE(pp, tokens, 0);
Jsi_JsonParser *p = &pp;
pp.strict = strict;
pp.flags = flags;
r = Jsi_JsonParse(p, json);
if (r != JSI_JSON_ERR_NONE) {
int ofs = pp.pos, len = Jsi_Strlen(json);
if (ofs<0 || ofs>len)
ofs = 0;
err = p->errStr;
if (!err)
err = Jsi_JsonGetErrname(r);
Jsi_LogError("JSON parse error (%s) at offset %d \"%.30s\"", err, ofs, json+ofs);
result = -1;
goto done;
}
tok = p->tokens;
Jsi_DSInit(&nStr);
if (tok->size%2 || tok->type != JSI_JTYPE_OBJECT) {
result = -1;
goto done;
}
v = Jsi_ValueNew1(interp);
for (i=1; i<p->toknext && i<tok->size; i++) {
if (p->tokens[i].type != JSI_JTYPE_STRING) {
result = Jsi_LogError("expected string at %d", i-1);
goto bail;
}
name = Jsi_JsonGetTokstr(p, json, i, &len);
Jsi_DSSetLength(&nStr, 0);
Jsi_DSAppendLen(&nStr, name, len);
name = Jsi_DSValue(&nStr);
i++;
switch (p->tokens[i].type) {
case JSI_JTYPE_PRIMITIVE:
t = Jsi_JsonGetTokstr(p, json, i, &len);
if ((len == 4 && Jsi_Strncmp(t, "true", len)==0) || (len == 5 && Jsi_Strncmp(t, "false", len)==0)) {
Jsi_ValueMakeBool(interp, &v, (bool)(len==4?1:0));
} else if (len == 4 && Jsi_Strncmp(t, "null", len)==0) {
Jsi_ValueMakeNull(interp, &v);
} else {
char *ep;
Jsi_Number d = strtod(t,&ep);
if (ep>(t+len)) {
result = Jsi_LogError("bad number %*s", len, t);
goto bail;
}
Jsi_ValueMakeNumber(interp, &v, d);
}
break;
case JSI_JTYPE_STRING:
t = Jsi_JsonGetTokstr(p, json, i, &len);
Jsi_DString dStr;
Jsi_DSInit(&dStr);
jsonNewDString(interp, &dStr, t, len);
Jsi_ValueMakeStringKey(interp, &v, Jsi_DSValue(&dStr));
Jsi_DSFree(&dStr);
break;
case JSI_JTYPE_ARRAY:
case JSI_JTYPE_OBJECT:
default:
result = -1;
goto bail;
break;
}
result++;
rc = Jsi_OptionsSet(interp, opts, data, name, v, 0);
if (rc == JSI_OK)
continue;
bail:
Jsi_LogError("bad at field: %s", name);
result = -1;
break;
}
done:
Jsi_DSFree(&nStr);
if (v)
Jsi_DecrRefCount(interp, v);
Jsi_JsonFree(&pp);
return result;
} | 214,005,280,974,227,020,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,612 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | Jsi_RC Jsi_ValueToNumber(Jsi_Interp *interp, Jsi_Value *v)
{
if (v->vt == JSI_VT_NUMBER) return JSI_OK;
Jsi_Number a = Jsi_ValueToNumberInt(interp, v, 0);
Jsi_ValueReset(interp, &v);
Jsi_ValueMakeNumber(interp, &v, a);
return JSI_OK;
} | 128,909,384,483,570,900,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,613 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | static Jsi_RC jsi_ValueToVerify(Jsi_Interp *interp, Jsi_OptionSpec* spec, Jsi_Value *inValue, const char *inStr, void *record, Jsi_Wide flags)
{
if (inStr)
return JSI_ERROR;
Jsi_Value **s = (Jsi_Value**)((char*)record) + spec->offset;
Jsi_ValueHandlerProc *vfunc = (Jsi_ValueHandlerProc*)spec->data;
if (!vfunc)
return Jsi_LogError("custom value spec did not set data: %s", spec->name);
if (!inValue) {
if (*s)
Jsi_DecrRefCount(interp, *s);
*s = NULL;
return JSI_OK;
}
if (vfunc(interp, inValue, spec, record) != JSI_OK)
return JSI_ERROR;
*s = inValue;
if (*s)
Jsi_IncrRefCount(interp, *s);
return JSI_OK;
} | 316,104,403,418,707,000,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |
520,614 | jsish | 430ea27accd4d4ffddc946c9402e7c9064835a18 | https://github.com/pcmacdon/jsish | https://github.com/pcmacdon/jsish/commit/430ea27accd4d4ffddc946c9402e7c9064835a18 | Release "3.0.7": Fix toPrecision bug "stack overflow #4".
FossilOrigin-Name: 6c7f0c37027d7f890b57cb38f776af39b8f81f03e60ceeb0a231a1d21e24b5de | 0 | void *Jsi_FunctionPrivData(Jsi_Func *funcPtr)
{
return funcPtr->privData;
} | 237,288,775,172,738,800,000,000,000,000,000,000,000 | None | null | [
"CWE-120"
] | CVE-2020-22873 | Buffer overflow vulnerability in function NumberToPrecisionCmd in jsish before 3.0.7, allows remote attackers to execute arbitrary code. | https://nvd.nist.gov/vuln/detail/CVE-2020-22873 |