4472 fexistcase(str);CID 492287: Error handling issues (CHECKED_RETURN)
Calling "fexistcase" without checking return value (as is done elsewhere 117 out of 131 times).
811 if(client->protocol == NULL || username == NULL)CID 493283: Incorrect expression (NO_EFFECT)
Comparing an array to null is not useful: "client->protocol == NULL", since the test will always evaluate as true.
325 return strdup(cp);CID 497098: Resource leaks (RESOURCE_LEAK)
Variable "cp" going out of scope leaks the storage it points to.
950 if(array == NULL && !JS_GetArrayLength(cx, array, &len)) {CID 508260: Null pointer dereferences (FORWARD_NULL)
Passing null pointer "array" to "JS_GetArrayLength", which dereferences it.
491 JS_ReportError(cx, "Unable to get parent js object"); 492 return JS_FALSE;CID 508259: Control flow issues (DEADCODE)
Execution cannot reach this statement: "JS_ReportError(cx, "Unable ...".
387 SAFECAT(buf,crlf);CID 508288: (STRING_NULL)
Passing unterminated string "buf" to "strlen", which expects a null-terminated string.
387 SAFECAT(buf,crlf);CID 508288: (STRING_NULL)
Passing unterminated string "buf" to "strlen", which expects a null-terminated string.
3127 HANDLE_PENDING(cx, tmp);CID 508287: Resource leaks (RESOURCE_LEAK)
Variable "server_user_name" going out of scope leaks the storage it points to.
3127 HANDLE_PENDING(cx, tmp);CID 508286: Resource leaks (RESOURCE_LEAK)
Variable "addr" going out of scope leaks the storage it points to.
3128 strListPush(&send_strings, tmp);CID 508285: Resource leaks (RESOURCE_LEAK)
Variable "term_type" going out of scope leaks the storage it points to. 3127 HANDLE_PENDING(cx, tmp);
3041 HANDLE_PENDING(cx, tmp);CID 508284: Resource leaks (RESOURCE_LEAK)
Variable "addr" going out of scope leaks the storage it points to.
3127 HANDLE_PENDING(cx, tmp);CID 508283: Resource leaks (RESOURCE_LEAK)
Variable "client_user_name" going out of scope leaks the storage it points to.
1308 && strcmp(filename, file.name) != 0 && smb_findfile(&p->smb, file.name, NULL) == SMB_SUCCESS) {CID 509555: Null pointer dereferences (FORWARD_NULL)
Passing null pointer "file.name" to "strcmp", which dereferences it. 1307 if(p->smb_result == SMB_SUCCESS
633 printf(" %02X %.*s", fidx.hash.flags, (int)sizeof(fidx.name), fidx.name);CID 509554: Memory - illegal accesses (STRING_NULL)
Passing unterminated string "fidx.name" to "printf", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
1335 if(p->smb_result != SMB_SUCCESS)CID 509553: Control flow issues (NESTING_INDENT_MISMATCH)
This 'if' statement is indented to column 41, as if it were nested within the preceding parent statement, but it is not.
244 if(stricmp(fidx.name, fname) != 0)CID 509552: Memory - illegal accesses (STRING_NULL)
Passing unterminated string "fidx.name" to "strcasecmp", which expects a null-terminated string.
441 if(stricmp(fidx[i].name, fname) == 0) {Passing unterminated string "fidx[i].name" to "strcasecmp", which expects a null-terminated string.
139 return 0;CID 509721: Resource leaks (RESOURCE_LEAK)
Variable "ini" going out of scope leaks the storage it points to.
670 return(0);CID 509720: (RESOURCE_LEAK)
Variable "csts" going out of scope leaks the storage it points to.
676 return(0);CID 509720: (RESOURCE_LEAK)
Variable "csts" going out of scope leaks the storage it points to.
649 if((csts = fopen_cstats(&cfg, i, /* for_write: */TRUE)) == NULL) {CID 509720: (RESOURCE_LEAK)
Overwriting "csts" in "csts = fopen_cstats(&this->cfg, i, true)" leaks the storage that "csts" points to.
673 return(0);CID 509720: (RESOURCE_LEAK)
Variable "csts" going out of scope leaks the storage it points to.
682 return(0L);CID 509720: (RESOURCE_LEAK)
Variable "csts" going out of scope leaks the storage it points to.
361 SAFEPRINTF(str,"%s ",unixtodstr(&cfg,(time32_t)now,tmp));CID 510624: High impact quality (Y2K38_SAFETY)
A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "this->now" is cast to "time32_t".
2334 xfer_type = (xfer_type == XFER_UPLOAD) ? XFER_BATCH_UPLOAD : XFER_BATCH_DOWNLOAD;CID 511447: Control flow issues (DEADCODE)
Execution cannot reach the expression "XFER_BATCH_UPLOAD" inside this statement: "xfer_type = ((xfer_type == ...".
158 return unixtodstr(cfg, (time32_t)t, str);CID 511508: High impact quality (Y2K38_SAFETY)
A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "t" is cast to "time32_t".
990 return ::unixtodstr(&cfg, t, str);CID 511621: High impact quality (Y2K38_SAFETY)
A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "t" is cast to "time32_t".
1367 snprintf(opt[0],MAX_OPLN,"Numeric (e.g. %s)", unixtodstr(&cfg, (time32_t)t, tmp));CID 512127: (Y2K38_SAFETY)
A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "t" is cast to "time32_t".
1368 snprintf(opt[1],MAX_OPLN,"Verbal (e.g. %s)", verbal_datestr(&cfg, (time32_t)t, tmp));CID 512127: (Y2K38_SAFETY)
A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "t" is cast to "time32_t".
1001 uint8_t ch = line[i].ch;CID 514434: (NULL_RETURNS)
Dereferencing "line", which is known to be "NULL".
999 vmem_gettext(cterm->x, sy, cterm->x + tx - 2, sy, line);CID 514434: (NULL_RETURNS)
Dereferencing a pointer that might be "NULL" "line" when calling "ciolib_vmem_gettext".
4985 vmem_gettext(sx, sy, ex, sy, line);CID 514433: (NULL_RETURNS)
Dereferencing a pointer that might be "NULL" "line" when calling "ciolib_vmem_gettext".
5098 vmem_puttext(sx, sy, ex, sy, line);CID 514433: (NULL_RETURNS)
Dereferencing a pointer that might be "NULL" "line" when calling "ciolib_vmem_puttext".
4990 if (line[i].fg & 0x7F000000) {CID 514433: (NULL_RETURNS)
Dereferencing "line", which is known to be "NULL".
1659 lprintf(LOG_ERR, "%04d %s [%s] <%s> !Error %d writing user data for user #%d"CID 514483: API usage errors (PRINTF_ARGS)
No argument for format specifier "%d".
1661 ,session->username, session->user.number);CID 514482: API usage errors (PW.TOO_FEW_PRINTF_ARGS)
the format string requires additional arguments
4850 online = false;CID 514519: (LOCK)
"external" unlocks "this->input_thread_mutex" while it is unlocked. 4849 int result = external(cmd, EX_OFFLINE);
4849 int result = external(cmd, EX_OFFLINE);CID 514519: (LOCK)
"external" locks "this->input_thread_mutex" while it is locked.
298 safe_snprintf(smb->last_error,sizeof(smb->last_error),"%s timeout locking message base after %d seconds", __FUNCTION__, time(NULL) - start);CID 514629: API usage errors (PW.PRINTF_ARG_MISMATCH)
argument is incompatible with corresponding format string conversion (expected type "int" but argument has type "long")
298 safe_snprintf(smb->last_error,sizeof(smb->last_error),"%s timeout locking message base after %d seconds", __FUNCTION__, time(NULL) - start);CID 514628: API usage errors (PRINTF_ARGS)
Argument "time(NULL) - start" to format specifier "%d" was expected to have type "int" but has type "long".
1397 return "";CID 514647: Resource leaks (RESOURCE_LEAK)
Handle variable "f" going out of scope leaks the handle.
1848 if((fwdfile=tmpfile())==NULL) { 1849 lprintf(LOG_ERR,"ERROR line %d opening forward temp "CID 515048: Security best practices violations (SECURE_TEMP)
"tmpfile" creates files with predictable names, which is unsafe.
1635 if(add_all || j >= 0) {CID 515047: Control flow issues (NO_EFFECT)
This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "j >= 0U".
1989 chmod(outpath, st.st_mode);CID 515046: Error handling issues (CHECKED_RETURN)
Calling "chmod(outpath, st.st_mode)" without checking return value. This library function may fail and return an error code.
2142 if((tmpf=tmpfile())==NULL) {CID 515063: Security best practices violations (SECURE_TEMP)
"tmpfile" creates files with predictable names, which is unsafe.
Sysop: | Angel Ripoll |
---|---|
Location: | Madrid, Spain |
Users: | 11 |
Nodes: | 8 (0 / 8) |
Uptime: | 160:36:56 |
Calls: | 476 |
Calls today: | 1 |
Files: | 14,051 |
Messages: | 66,560 |