sqlite-3.46.0-2.fc41

List of Defects

Error: COMPILER_WARNING (CWE-1164): [#def1]
sqlite-3.46.0-build/sqlite-src-3460000/sqlite3_analyzer.c:185110:21: warning[-Wunused-function]: 'sqlite3ConnectionBlocked' defined but not used
#185110 | SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
#       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
#185108|   ** until connection pBlocker concludes its current transaction.
#185109|   */
#185110|-> SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
#185111|     enterMutex();
#185112|     if( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){

Error: CPPCHECK_WARNING: [#def2]
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-401): [#def3]
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c:1220: error[memleakOnRealloc]: Common realloc mistake: 'zLine' nulled but not freed upon failure
# 1218|       if( n+100>nLine ){
# 1219|         nLine = nLine*2 + 100;
# 1220|->       zLine = realloc(zLine, nLine);
# 1221|         if( zLine==0 ) return 0;
# 1222|       }

Error: CLANG_WARNING: [#def4]
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c:1221:29: warning[unix.Malloc]: Potential leak of memory pointed to by 'zLine'
# 1219|         nLine = nLine*2 + 100;
# 1220|         zLine = realloc(zLine, nLine);
# 1221|->       if( zLine==0 ) return 0;
# 1222|       }
# 1223|       if( fgets(&zLine[n], nLine - n, in)==0 ){

Error: CPPCHECK_WARNING (CWE-401): [#def5]
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c:1238: error[memleakOnRealloc]: Common realloc mistake: 'zLine' nulled but not freed upon failure
# 1236|       }
# 1237|     }
# 1238|->   zLine = realloc( zLine, n+1 );
# 1239|     return zLine;
# 1240|   }

Error: CLANG_WARNING: [#def6]
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c:1548:28: warning[core.NullDereference]: Access to field 'pNext' results in a dereference of a null pointer (loaded from field 'stmtLast')
# 1546|         SqlPreparedStmt *pLast = pDb->stmtLast;
# 1547|         pDb->stmtLast = pLast->pPrev;
# 1548|->       pDb->stmtLast->pNext = 0;
# 1549|         pDb->nStmt--;
# 1550|         dbFreeStmt(pLast);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c: scope_hint: In function ‘DbHookCmd’
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c:1914:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ppHook’
/usr/include/tcl.h:2421: included_from: Included from here.
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c:41: included_from: Included from here.
# 1912|     sqlite3 *db = pDb->db;
# 1913|   
# 1914|->   if( *ppHook ){
# 1915|       Tcl_SetObjResult(interp, *ppHook);
# 1916|       if( pArg ){

Error: CLANG_WARNING: [#def8]
sqlite-3.46.0-build/sqlite-src-3460000/src/tclsqlite.c:2621:5: warning[unix.Malloc]: Potential memory leak
# 2619|         }
# 2620|       }
# 2621|->     free(azCol);
# 2622|       fclose(in);
# 2623|       sqlite3_finalize(pStmt);

Error: CPPCHECK_WARNING: [#def9]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-686): [#def10]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘lemon_vsprintf’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:188:13: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 1 of ‘ap’
#  186|         }
#  187|         if( c=='d' ){
#  188|->         int v = va_arg(ap, int);
#  189|           if( v<0 ){
#  190|             lemon_addtext(str, &nUsed, "-", 1, iWidth);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def11]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:188:13: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 2 of ‘ap’
#  186|         }
#  187|         if( c=='d' ){
#  188|->         int v = va_arg(ap, int);
#  189|           if( v<0 ){
#  190|             lemon_addtext(str, &nUsed, "-", 1, iWidth);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def12]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:203:11: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘const char *’ but received ‘int’ for variadic argument 1 of ‘ap’
#  201|           lemon_addtext(str, &nUsed, &zTemp[sizeof(zTemp)-k], k, iWidth);
#  202|         }else if( c=='s' ){
#  203|->         z = va_arg(ap, const char*);
#  204|           lemon_addtext(str, &nUsed, z, -1, iWidth);
#  205|         }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){

Error: GCC_ANALYZER_WARNING (CWE-686): [#def13]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:207:11: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 1 of ‘ap’
#  205|         }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){
#  206|           i += 2;
#  207|->         k = va_arg(ap, int);
#  208|           z = va_arg(ap, const char*);
#  209|           lemon_addtext(str, &nUsed, z, k, iWidth);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def14]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:207:11: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 2 of ‘ap’
#  205|         }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){
#  206|           i += 2;
#  207|->         k = va_arg(ap, int);
#  208|           z = va_arg(ap, const char*);
#  209|           lemon_addtext(str, &nUsed, z, k, iWidth);

Error: CLANG_WARNING: [#def15]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:995:39: warning[core.NullDereference]: Access to field 'lhs' results in a dereference of a null pointer (loaded from field 'startRule')
#  993|           "The specified start symbol \"%s\" is not "
#  994|           "in a nonterminal of the grammar.  \"%s\" will be used as the start "
#  995|->         "symbol instead.",lemp->start,lemp->startRule->lhs->name);
#  996|         lemp->errorcnt++;
#  997|         sp = lemp->startRule->lhs;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def16]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘OptInit.part.0’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:2205:5: warning[-Wanalyzer-null-argument]: use of NULL ‘err’ where non-null expected
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:14: included_from: Included from here.
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:9: included_from: Included from here.
/usr/include/stdio.h:357:12: note: argument 1 of ‘fprintf’ must be non-null
# 2203|     }
# 2204|     if( errcnt>0 ){
# 2205|->     fprintf(err,"Valid command line options for \"%s\" are:\n",*a);
# 2206|       OptPrint();
# 2207|       exit(1);

Error: CLANG_WARNING: [#def17]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:2755:11: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 2753|               *(zBuf++) = '\n';
# 2754|             }
# 2755|->           memcpy(zBuf, zLine, nLine);
# 2756|             zBuf += nLine;
# 2757|             *(zBuf++) = '"';

Error: CLANG_WARNING: [#def18]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:2770:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 2768|             psp->decllinenoslot[0] = psp->tokenlineno;
# 2769|           }
# 2770|->         memcpy(zBuf, zNew, nNew);
# 2771|           zBuf += nNew;
# 2772|           *zBuf = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def19]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘tplt_open’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:3783:8: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*tpltname’
/usr/include/stdio.h:264:14: note: argument 1 of ‘fopen’ must be a pointer to a null-terminated string
# 3781|       return 0;
# 3782|     }
# 3783|->   in = fopen(tpltname,"rb");
# 3784|     if( in==0 ){
# 3785|       fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);

Error: CLANG_WARNING: [#def20]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5148:11: warning[core.NullDereference]: Access to field 'lhsStart' results in a dereference of a null pointer (loaded from variable 'rp')
# 5146|         if( ap->type!=REDUCE ) continue;
# 5147|         rp = ap->x.rp;
# 5148|->       if( rp->lhsStart ) continue;
# 5149|         if( rp==rbest ) continue;
# 5150|         n = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:12: included_from: Included from here.
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Symbol_new’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5526:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘x’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5526:16: note: in expansion of macro ‘ISUPPER’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5526:16: note: in expansion of macro ‘ISUPPER’
# 5524|       MemoryCheck(sp);
# 5525|       sp->name = Strsafe(x);
# 5526|->     sp->type = ISUPPER(*x) ? TERMINAL : NONTERMINAL;
# 5527|       sp->rule = 0;
# 5528|       sp->fallback = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5979:29: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
# 5977|       array.ht = (x4node**)&(array.tbl[arrSize]);
# 5978|       for(i=0; i<arrSize; i++) array.ht[i] = 0;
# 5979|->     for(i=0; i<x4a->count; i++){
# 5980|         x4node *oldnp, *newnp;
# 5981|         oldnp = &(x4a->tbl[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5984:43: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
# 5982|         h = confighash(oldnp->data) & (arrSize-1);
# 5983|         newnp = &(array.tbl[i]);
# 5984|->       if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
# 5985|         newnp->next = array.ht[h];
# 5986|         newnp->data = oldnp->data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5996:37: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
# 5994|     np = &(x4a->tbl[x4a->count++]);
# 5995|     np->data = data;
# 5996|->   if( x4a->ht[h] ) x4a->ht[h]->from = &(np->next);
# 5997|     np->next = x4a->ht[h];
# 5998|     x4a->ht[h] = np;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c:5999:19: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
sqlite-3.46.0-build/sqlite-src-3460000/tool/lemon.c: scope_hint: In function ‘Configtable_insert’
# 5997|     np->next = x4a->ht[h];
# 5998|     x4a->ht[h] = np;
# 5999|->   np->from = &(x4a->ht[h]);
# 6000|     return 1;
# 6001|   }

Error: CPPCHECK_WARNING: [#def26]
sqlite-3.46.0-build/sqlite-src-3460000/tool/mkkeywordhash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def27]
sqlite-3.46.0-build/sqlite-src-3460000/tool/mksourceid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def28]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def29]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:288:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  286|     az = sqlite3_malloc( sizeof(char*)*(nPK+1) );
#  287|     if( az==0 ) runtimeError("out of memory");
#  288|->   memset(az, 0, sizeof(char*)*(nPK+1));
#  289|     if( g.bSchemaCompare ){
#  290|       az[0] = sqlite3_mprintf("%s", "type");

Error: CLANG_WARNING: [#def30]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:305:19: warning[core.NullDereference]: Array access (from variable 'az') results in a null pointer dereference
#  303|           az = sqlite3_realloc(az, sizeof(char*)*(naz+2) );
#  304|           if( az==0 ) runtimeError("out of memory");
#  305|->         az[naz++] = sid;
#  306|         }
#  307|       }

Error: CLANG_WARNING: [#def31]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1103:9: warning[deadcode.DeadStores]: Value stored to 'bestCnt' is never read
# 1101|             lastRead = bestOfst + bestCnt - 1;
# 1102|           }
# 1103|->         bestCnt = 0;
# 1104|           break;
# 1105|         }

Error: CLANG_WARNING: [#def32]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1260:15: warning[core.NullDereference]: Array access (from variable 'azCol') results in a null pointer dereference
# 1258|       runtimeError("table %s has no usable PK columns", zTab);
# 1259|     }
# 1260|->   for(nCol=0; azCol[nCol]; nCol++);
# 1261|   
# 1262|     /* Build and output the CREATE TABLE statement for the data_xxx table */

Error: CLANG_WARNING: [#def33]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1583:19: warning[core.NullDereference]: Array access (from variable 'azCol') results in a null pointer dereference
# 1581|       aiFlg = sqlite3_realloc(aiFlg, sizeof(int)*nCol);
# 1582|       if( aiFlg==0 ) runtimeError("out of memory");
# 1583|->     azCol[nCol-1] = safeId((const char*)sqlite3_column_text(pStmt,1));
# 1584|       aiFlg[nCol-1] = i = sqlite3_column_int(pStmt,5);
# 1585|       if( i>0 ){

Error: CLANG_WARNING: [#def34]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1584:19: warning[core.NullDereference]: Array access (from variable 'aiFlg') results in a null pointer dereference
# 1582|       if( aiFlg==0 ) runtimeError("out of memory");
# 1583|       azCol[nCol-1] = safeId((const char*)sqlite3_column_text(pStmt,1));
# 1584|->     aiFlg[nCol-1] = i = sqlite3_column_int(pStmt,5);
# 1585|       if( i>0 ){
# 1586|         if( i>nPk ){

Error: CLANG_WARNING: [#def35]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1591:17: warning[core.NullDereference]: Array access (from variable 'aiPk') results in a null pointer dereference
# 1589|           if( aiPk==0 ) runtimeError("out of memory");
# 1590|         }
# 1591|->       aiPk[i-1] = nCol-1;
# 1592|       }
# 1593|     }

Error: CLANG_WARNING: [#def36]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1824:3: warning[deadcode.DeadStores]: Value stored to 'zSql' is never read
# 1822|     zSql = gobble_token(zSql, zToken, sizeof(zToken));
# 1823|     if( zSql==0 || sqlite3_stricmp(zToken, "using") ) return;
# 1824|->   zSql = gobble_token(zSql, zToken, sizeof(zToken));
# 1825|     
# 1826|     sqlite3_result_text(pCtx, zToken, -1, SQLITE_TRANSIENT);

Error: COMPILER_WARNING (CWE-563): [#def37]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c: scope_hint: In function 'all_tables_sql'
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1835:9: warning[-Wunused-but-set-variable]: variable 'rc' set but not used
# 1835 |     int rc;
#      |         ^~
# 1833|   const char *all_tables_sql(){
# 1834|     if( g.bHandleVtab ){
# 1835|->     int rc;
# 1836|     
# 1837|       rc = sqlite3_exec(g.db, 

Error: CLANG_WARNING: [#def38]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1837:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1835|       int rc;
# 1836|     
# 1837|->     rc = sqlite3_exec(g.db, 
# 1838|           "CREATE TEMP TABLE tblmap(module COLLATE nocase, postfix);"
# 1839|           "INSERT INTO temp.tblmap VALUES"

Error: CLANG_WARNING: [#def39]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1853:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1851|       assert( rc==SQLITE_OK );
# 1852|     
# 1853|->     rc = sqlite3_create_function(
# 1854|           g.db, "module_name", 1, SQLITE_UTF8, 0, module_name_func, 0, 0
# 1855|       );

Error: CLANG_WARNING: [#def40]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1948:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'azExt'
# 1946|         }else
# 1947|         if( strcmp(z,"help")==0 ){
# 1948|->         showHelp();
# 1949|           return 0;
# 1950|         }else

Error: CLANG_WARNING: [#def41]
sqlite-3.46.0-build/sqlite-src-3460000/tool/sqldiff.c:1956:23: warning[core.NullDereference]: Array access (from variable 'azExt') results in a null pointer dereference
# 1954|           azExt = realloc(azExt, sizeof(azExt[0])*(nExt+1));
# 1955|           if( azExt==0 ) cmdlineError("out of memory");
# 1956|->         azExt[nExt++] = argv[++i];
# 1957|         }else
# 1958|   #endif

Error: CPPCHECK_WARNING: [#def42]
sqlite-3.46.0-build/sqlite-src-3460000/tool/src-verify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def43]
sqlite-3.46.0-build/sqlite-src-3460000/tool/src-verify.c:863: warning[nullPointer]: Possible null pointer dereference: zDir
#  861|       return 1;
#  862|     }
#  863|->   if( strlen(zDir)>1000 ){
#  864|       fprintf(stderr, "Directory argument too big: [%s]\n", zDir);
#  865|       return 1;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def44]
sqlite-3.46.0-build/sqlite-src-3460000/tool/src-verify.c: scope_hint: In function ‘main’
sqlite-3.46.0-build/sqlite-src-3460000/tool/src-verify.c:863:7: warning[-Wanalyzer-null-argument]: use of NULL ‘zDir’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  861|       return 1;
#  862|     }
#  863|->   if( strlen(zDir)>1000 ){
#  864|       fprintf(stderr, "Directory argument too big: [%s]\n", zDir);
#  865|       return 1;

Error: CLANG_WARNING: [#def45]
sqlite-3.46.0-build/sqlite-src-3460000/tool/src-verify.c:863:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  861|       return 1;
#  862|     }
#  863|->   if( strlen(zDir)>1000 ){
#  864|       fprintf(stderr, "Directory argument too big: [%s]\n", zDir);
#  865|       return 1;

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-217.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namesqlite-3.46.0-2.fc41
store-results-to/tmp/tmptmuy_kgv/sqlite-3.46.0-2.fc41.tar.xz
time-created2024-07-03 18:06:34
time-finished2024-07-03 18:14:41
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmptmuy_kgv/sqlite-3.46.0-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmptmuy_kgv/sqlite-3.46.0-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9