Task #118716 - added.err
back to task #118716download
Error: SHELLCHECK_WARNING:
/usr/bin/brltty-config.sh:66:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
# 64| local PACKAGE_TARNAME='brltty'
# 65| local PACKAGE_NAME='BRLTTY'
# 66|-> local PACKAGE_VERSION='6.9.1'
# 67| local PACKAGE_URL='https://brltty.app/'
# 68| local PACKAGE_BUGREPORT='BRLTTY@brltty.app'
Error: SHELLCHECK_WARNING:
/usr/bin/brltty-config.sh:82:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
# 80|
# 81| local api_version='0.8'
# 82|-> local api_release='0.8.8'
# 83| local api_authkeyfile='brlapi.key'
# 84|
Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/brltty-prologue.sh:153:10: warning[SC2034]: programPath appears unused. Verify use (or export if used externally).
# 151| programDirectory="$(dirname "${0}")"
# 152| readonly programDirectory="$(resolveDirectory "${programDirectory}")"
# 153|-> readonly programPath="${programDirectory}/${programName}"
# 154|
# 155| parseParameterString() {
Error: SHELLCHECK_WARNING:
/usr/bin/brltty-prologue.sh:319:4: warning[SC3043]: In POSIX sh, 'local' is undefined.
# 317|
# 318| findSiblingBrltty() {
# 319|-> local -n _path="${1}"
# 320|
# 321| findSiblingCommand _path brltty run-brltty || {
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/brltty-tmux:61:7: warning[SC2154]: optSudo is referenced but not assigned.
# 59| then
# 60| ttyNumber="$(fgconsole)"
# 61|-> elif "${optSudo}"
# 62| then
# 63| sudo --validate && {
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/brltty-tmux:69:41: warning[SC2154]: programPath is referenced but not assigned.
# 67| )
# 68|
# 69|-> exec sudo "${sudoOptions[@]}" -- "${programPath}" "${programArguments[@]}"
# 70| exit "${?}"
# 71| }
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/brltty-tmux:73:5: warning[SC2154]: optContinue is referenced but not assigned.
# 71| }
# 72|
# 73|-> "${optContinue}" || exit 9
# 74| logWarning "continuing - starting brltty as \"$(id -u -n)\""
# 75| fi
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/brltty-tmux:92:7: warning[SC2154]: brlttyPath is referenced but not assigned.
# 90|
# 91| needSiblingBrltty brlttyPath
# 92|-> exec "${brlttyPath}" "${brlttyOptions[@]}" "${programParameters[@]}" 2>/dev/null
# 93| exit "${?}"
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:249: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
# 247| static void addRows(long pos, long num) {
# 248| curNumRows += num;
# 249|-> curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 250| curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 251| memmove(curRows +pos+num,curRows +pos,(curNumRows-(pos+num))*sizeof(*curRows));
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:250: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
# 248| curNumRows += num;
# 249| curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 250|-> curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 251| memmove(curRows +pos+num,curRows +pos,(curNumRows-(pos+num))*sizeof(*curRows));
# 252| memmove(curRowLengths+pos+num,curRowLengths+pos,(curNumRows-(pos+num))*sizeof(*curRowLengths));
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:262: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
# 260| memmove(curRowLengths+pos,curRowLengths+pos+num,(curNumRows-(pos+num))*sizeof(*curRowLengths));
# 261| curNumRows -= num;
# 262|-> curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 263| curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 264| }
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:263: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
# 261| curNumRows -= num;
# 262| curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 263|-> curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 264| }
# 265|
Error: CPPCHECK_WARNING (CWE-476):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1363: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Watch
# 1361| {
# 1362| struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1363|-> a2Watch->watch = watch;
# 1364| int flags = dbus_watch_get_flags(watch);
# 1365| if (dbus_watch_get_enabled(watch))
Error: GCC_ANALYZER_WARNING (CWE-476):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1363:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Watch’
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1387:6: enter_function: entry to ‘a2WatchToggled’
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1390:8: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1391:7: branch_true: ...to here
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1391:7: call_function: calling ‘a2AddWatch’ from ‘a2WatchToggled’
# 1361| {
# 1362| struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1363|-> a2Watch->watch = watch;
# 1364| int flags = dbus_watch_get_flags(watch);
# 1365| if (dbus_watch_get_enabled(watch))
Error: CPPCHECK_WARNING (CWE-476):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1430: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Timeout
# 1428| {
# 1429| struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1430|-> a2Timeout->timeout = timeout;
# 1431| if (dbus_timeout_get_enabled(timeout))
# 1432| asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
Error: GCC_ANALYZER_WARNING (CWE-476):
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1430:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Timeout’
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1446:6: enter_function: entry to ‘a2TimeoutToggled’
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1449:8: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1450:7: branch_true: ...to here
brltty-6.9.1/minimal/Drivers/Screen/AtSpi2/screen.c:1450:7: call_function: calling ‘a2AddTimeout’ from ‘a2TimeoutToggled’
# 1428| {
# 1429| struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1430|-> a2Timeout->timeout = timeout;
# 1431| if (dbus_timeout_get_enabled(timeout))
# 1432| asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
Error: GCC_ANALYZER_WARNING (CWE-401):
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:393:1: warning[-Wanalyzer-malloc-leak]: leak of ‘newColors’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:993:1: enter_function: entry to ‘tmuxMonitorCallback’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1008:8: branch_false: following ‘false’ branch...
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1020:18: branch_false: ...to here
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1020:42: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1021:11: branch_true: ...to here
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1021:10: branch_false: following ‘false’ branch...
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1024:7: branch_false: ...to here
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1025:7: call_function: calling ‘parseTmuxOutput’ from ‘tmuxMonitorCallback’
# 391|
# 392| return 1;
# 393|-> }
# 394|
# 395| static void
Error: GCC_ANALYZER_WARNING (CWE-401):
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:393:1: warning[-Wanalyzer-malloc-leak]: leak of ‘newContent’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:993:1: enter_function: entry to ‘tmuxMonitorCallback’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1008:8: branch_false: following ‘false’ branch...
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1020:18: branch_false: ...to here
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1020:42: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1021:11: branch_true: ...to here
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1021:10: branch_false: following ‘false’ branch...
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1024:7: branch_false: ...to here
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:1025:7: call_function: calling ‘parseTmuxOutput’ from ‘tmuxMonitorCallback’
# 391|
# 392| return 1;
# 393|-> }
# 394|
# 395| static void
Error: GCC_ANALYZER_WARNING (CWE-775):
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:478:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipeStdout[0]’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:407:1: enter_function: entry to ‘construct_TmuxScreen’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:420:8: call_function: calling ‘startTmuxControlMode’ from ‘construct_TmuxScreen’
# 476| if (pipe(pipeStdout) < 0 || pipe(pipeStdin) < 0) {
# 477| logMessage(LOG_ERR, "Failed to create pipes: %s", strerror(errno));
# 478|-> return 0;
# 479| }
# 480|
Error: GCC_ANALYZER_WARNING (CWE-775):
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:478:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipeStdout[1]’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:407:1: enter_function: entry to ‘construct_TmuxScreen’
brltty-6.9.1/minimal/Drivers/Screen/Tmux/screen.c:420:8: call_function: calling ‘startTmuxControlMode’ from ‘construct_TmuxScreen’
# 476| if (pipe(pipeStdout) < 0 || pipe(pipeStdin) < 0) {
# 477| logMessage(LOG_ERR, "Failed to create pipes: %s", strerror(errno));
# 478|-> return 0;
# 479| }
# 480|
Error: CPPCHECK_WARNING (CWE-457):
brltty-6.9.1/minimal/Programs/brltty-cldr.c:114: error[uninitvar]: Uninitialized variable: character
# 112|
# 113| convertUtf8ToWchars(&byte, &end, size);
# 114|-> putHexadecimalCharacters(character, (end - character));
# 115| }
# 116|
Error: CPPCHECK_WARNING (CWE-457):
brltty-6.9.1/minimal/Programs/brltty-cmdref.c:231: warning[uninitvar]: Uninitialized variables: commands.name, commands.description, commands.code, commands.isToggle, commands.isMotion, commands.isRow, commands.isVertical, commands.isHorizontal, commands.isPanning, commands.isInput, commands.isCharacter, commands.isBraille, commands.isKeyboard, commands.isRouting, commands.isColumn, commands.isOffset, commands.isRange
# 229| commands[index] = &commandTable[index];
# 230| }
# 231|-> qsort(commands, count, sizeof(commands[0]), compareCommands);
# 232|
# 233| for (int index=0; index<count; index+=1) {
Error: CPPCHECK_WARNING (CWE-476):
brltty-6.9.1/minimal/Programs/cmdargs.c:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arguments
# 34| CommandArguments *arguments;
# 35| arguments = malloc(sizeof(*arguments));
# 36|-> arguments->queue = newQueue(NULL, NULL);
# 37| return arguments;
# 38| }
Error: GCC_ANALYZER_WARNING (CWE-476):
brltty-6.9.1/minimal/Programs/cmdargs.c:36:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arguments’
brltty-6.9.1/minimal/Programs/cmdargs.c:35:15: acquire_memory: this call could return NULL
brltty-6.9.1/minimal/Programs/cmdargs.c:36:3: danger: ‘arguments’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 34| CommandArguments *arguments;
# 35| arguments = malloc(sizeof(*arguments));
# 36|-> arguments->queue = newQueue(NULL, NULL);
# 37| return arguments;
# 38| }
Error: GCC_ANALYZER_WARNING (CWE-688):
brltty-6.9.1/minimal/Programs/cmdput.c:203:9: warning[-Wanalyzer-null-argument]: use of NULL ‘paragraphText’ where non-null expected
brltty-6.9.1/minimal/Programs/cmdput.c:173:10: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Programs/cmdput.c:174:33: branch_true: ...to here
brltty-6.9.1/minimal/Programs/cmdput.c:179:10: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
brltty-6.9.1/minimal/Programs/cmdput.c:180:14: branch_false: ...to here
brltty-6.9.1/minimal/Programs/cmdput.c:182:10: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Programs/cmdput.c:187:12: branch_false: following ‘false’ branch (when ‘paragraphLength == 0’)...
brltty-6.9.1/minimal/Programs/cmdput.c:189:12: branch_false: ...to here
brltty-6.9.1/minimal/Programs/cmdput.c:189:12: branch_false: following ‘false’ branch (when ‘paragraphSize >= newLength’)...
brltty-6.9.1/minimal/Programs/cmdput.c:202:12: branch_false: ...to here
brltty-6.9.1/minimal/Programs/cmdput.c:202:12: branch_false: following ‘false’ branch (when ‘paragraphLength == 0’)...
brltty-6.9.1/minimal/Programs/cmdput.c:203:16: branch_false: ...to here
brltty-6.9.1/minimal/Programs/cmdput.c:203:16: release_memory: ‘paragraphText’ is NULL
brltty-6.9.1/minimal/Programs/cmdput.c:203:9: danger: argument 1 (‘paragraphText + paragraphLength’) NULL where non-null expected
# 201|
# 202| if (extendingParagraph) paragraphText[paragraphLength++] = ' ';
# 203|-> memcpy(¶graphText[paragraphLength], text, textLength);
# 204| paragraphText[paragraphLength += textLength] = 0;
# 205| } else {
Error: GCC_ANALYZER_WARNING (CWE-457):
brltty-6.9.1/minimal/Programs/scr.c:230:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘candidates[<unknown>]’
brltty-6.9.1/minimal/Programs/scr.c:196:6: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
brltty-6.9.1/minimal/Programs/scr.c:200:7: branch_false: ...to here
brltty-6.9.1/minimal/Programs/scr.c:200:6: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Programs/scr.c:200:6: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:207:30: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.9.1/minimal/Programs/scr.c:208:38: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:212:23: branch_false: following ‘false’ branch (when ‘discardedCount <= j’)...
brltty-6.9.1/minimal/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/minimal/Programs/scr.c:218:10: branch_false: following ‘false’ branch (when ‘found == 0’)...
brltty-6.9.1/minimal/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/minimal/Programs/scr.c:222:23: branch_false: following ‘false’ branch (when ‘candidateCount <= j’)...
brltty-6.9.1/minimal/Programs/scr.c:240:10: branch_false: ...to here
brltty-6.9.1/minimal/Programs/scr.c:240:10: branch_true: following ‘true’ branch (when ‘candidateCount <= 15’)...
brltty-6.9.1/minimal/Programs/scr.c:241:9: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:207:30: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.9.1/minimal/Programs/scr.c:208:38: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:212:23: branch_false: following ‘false’ branch (when ‘discardedCount <= j’)...
brltty-6.9.1/minimal/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/minimal/Programs/scr.c:218:10: branch_false: following ‘false’ branch (when ‘found == 0’)...
brltty-6.9.1/minimal/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/minimal/Programs/scr.c:222:23: branch_true: following ‘true’ branch (when ‘candidateCount > j’)...
brltty-6.9.1/minimal/Programs/scr.c:223:38: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:223:12: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Programs/scr.c:225:14: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:225:14: branch_true: following ‘true’ branch (when ‘discardedCount <= 15’)...
brltty-6.9.1/minimal/Programs/scr.c:226:23: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:229:27: branch_true: following ‘true’ branch...
brltty-6.9.1/minimal/Programs/scr.c:230:40: branch_true: ...to here
brltty-6.9.1/minimal/Programs/scr.c:230:13: danger: use of uninitialized value ‘candidates[<unknown>]’ here
# 228| // Remove from candidates by shifting
# 229| for (int k = j; k < candidateCount - 1; k++) {
# 230|-> candidates[k] = candidates[k + 1];
# 231| }
# 232| candidateCount--;
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:249: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
# 247| static void addRows(long pos, long num) {
# 248| curNumRows += num;
# 249|-> curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 250| curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 251| memmove(curRows +pos+num,curRows +pos,(curNumRows-(pos+num))*sizeof(*curRows));
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:250: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
# 248| curNumRows += num;
# 249| curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 250|-> curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 251| memmove(curRows +pos+num,curRows +pos,(curNumRows-(pos+num))*sizeof(*curRows));
# 252| memmove(curRowLengths+pos+num,curRowLengths+pos,(curNumRows-(pos+num))*sizeof(*curRowLengths));
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:262: error[memleakOnRealloc]: Common realloc mistake: 'curRows' nulled but not freed upon failure
# 260| memmove(curRowLengths+pos,curRowLengths+pos+num,(curNumRows-(pos+num))*sizeof(*curRowLengths));
# 261| curNumRows -= num;
# 262|-> curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 263| curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 264| }
Error: CPPCHECK_WARNING (CWE-401):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:263: error[memleakOnRealloc]: Common realloc mistake: 'curRowLengths' nulled but not freed upon failure
# 261| curNumRows -= num;
# 262| curRows = realloc(curRows,curNumRows*sizeof(*curRows));
# 263|-> curRowLengths = realloc(curRowLengths,curNumRows*sizeof(*curRowLengths));
# 264| }
# 265|
Error: CPPCHECK_WARNING (CWE-476):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1363: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Watch
# 1361| {
# 1362| struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1363|-> a2Watch->watch = watch;
# 1364| int flags = dbus_watch_get_flags(watch);
# 1365| if (dbus_watch_get_enabled(watch))
Error: GCC_ANALYZER_WARNING (CWE-476):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1363:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Watch’
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1387:6: enter_function: entry to ‘a2WatchToggled’
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1390:8: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1391:7: branch_true: ...to here
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1391:7: call_function: calling ‘a2AddWatch’ from ‘a2WatchToggled’
# 1361| {
# 1362| struct a2Watch *a2Watch = calloc(1, sizeof(*a2Watch));
# 1363|-> a2Watch->watch = watch;
# 1364| int flags = dbus_watch_get_flags(watch);
# 1365| if (dbus_watch_get_enabled(watch))
Error: CPPCHECK_WARNING (CWE-476):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1430: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: a2Timeout
# 1428| {
# 1429| struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1430|-> a2Timeout->timeout = timeout;
# 1431| if (dbus_timeout_get_enabled(timeout))
# 1432| asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
Error: GCC_ANALYZER_WARNING (CWE-476):
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1430:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘a2Timeout’
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1446:6: enter_function: entry to ‘a2TimeoutToggled’
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1449:8: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1450:7: branch_true: ...to here
brltty-6.9.1/python3/Drivers/Screen/AtSpi2/screen.c:1450:7: call_function: calling ‘a2AddTimeout’ from ‘a2TimeoutToggled’
# 1428| {
# 1429| struct a2Timeout *a2Timeout = calloc(1, sizeof(*a2Timeout));
# 1430|-> a2Timeout->timeout = timeout;
# 1431| if (dbus_timeout_get_enabled(timeout))
# 1432| asyncNewRelativeAlarm(&a2Timeout->monitor, dbus_timeout_get_interval(timeout), a2ProcessTimeout, a2Timeout);
Error: GCC_ANALYZER_WARNING (CWE-401):
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:393:1: warning[-Wanalyzer-malloc-leak]: leak of ‘newColors’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:993:1: enter_function: entry to ‘tmuxMonitorCallback’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1008:8: branch_false: following ‘false’ branch...
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1020:18: branch_false: ...to here
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1020:42: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1021:11: branch_true: ...to here
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1021:10: branch_false: following ‘false’ branch...
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1024:7: branch_false: ...to here
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1025:7: call_function: calling ‘parseTmuxOutput’ from ‘tmuxMonitorCallback’
# 391|
# 392| return 1;
# 393|-> }
# 394|
# 395| static void
Error: GCC_ANALYZER_WARNING (CWE-401):
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:393:1: warning[-Wanalyzer-malloc-leak]: leak of ‘newContent’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:993:1: enter_function: entry to ‘tmuxMonitorCallback’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1008:8: branch_false: following ‘false’ branch...
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1020:18: branch_false: ...to here
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1020:42: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1021:11: branch_true: ...to here
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1021:10: branch_false: following ‘false’ branch...
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1024:7: branch_false: ...to here
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:1025:7: call_function: calling ‘parseTmuxOutput’ from ‘tmuxMonitorCallback’
# 391|
# 392| return 1;
# 393|-> }
# 394|
# 395| static void
Error: GCC_ANALYZER_WARNING (CWE-775):
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:478:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipeStdout[0]’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:407:1: enter_function: entry to ‘construct_TmuxScreen’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:420:8: call_function: calling ‘startTmuxControlMode’ from ‘construct_TmuxScreen’
# 476| if (pipe(pipeStdout) < 0 || pipe(pipeStdin) < 0) {
# 477| logMessage(LOG_ERR, "Failed to create pipes: %s", strerror(errno));
# 478|-> return 0;
# 479| }
# 480|
Error: GCC_ANALYZER_WARNING (CWE-775):
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:478:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipeStdout[1]’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:407:1: enter_function: entry to ‘construct_TmuxScreen’
brltty-6.9.1/python3/Drivers/Screen/Tmux/screen.c:420:8: call_function: calling ‘startTmuxControlMode’ from ‘construct_TmuxScreen’
# 476| if (pipe(pipeStdout) < 0 || pipe(pipeStdin) < 0) {
# 477| logMessage(LOG_ERR, "Failed to create pipes: %s", strerror(errno));
# 478|-> return 0;
# 479| }
# 480|
Error: CPPCHECK_WARNING (CWE-457):
brltty-6.9.1/python3/Programs/brltty-cldr.c:114: error[uninitvar]: Uninitialized variable: character
# 112|
# 113| convertUtf8ToWchars(&byte, &end, size);
# 114|-> putHexadecimalCharacters(character, (end - character));
# 115| }
# 116|
Error: CPPCHECK_WARNING (CWE-457):
brltty-6.9.1/python3/Programs/brltty-cmdref.c:231: warning[uninitvar]: Uninitialized variables: commands.name, commands.description, commands.code, commands.isToggle, commands.isMotion, commands.isRow, commands.isVertical, commands.isHorizontal, commands.isPanning, commands.isInput, commands.isCharacter, commands.isBraille, commands.isKeyboard, commands.isRouting, commands.isColumn, commands.isOffset, commands.isRange
# 229| commands[index] = &commandTable[index];
# 230| }
# 231|-> qsort(commands, count, sizeof(commands[0]), compareCommands);
# 232|
# 233| for (int index=0; index<count; index+=1) {
Error: CPPCHECK_WARNING (CWE-476):
brltty-6.9.1/python3/Programs/cmdargs.c:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arguments
# 34| CommandArguments *arguments;
# 35| arguments = malloc(sizeof(*arguments));
# 36|-> arguments->queue = newQueue(NULL, NULL);
# 37| return arguments;
# 38| }
Error: GCC_ANALYZER_WARNING (CWE-476):
brltty-6.9.1/python3/Programs/cmdargs.c:36:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘arguments’
brltty-6.9.1/python3/Programs/cmdargs.c:35:15: acquire_memory: this call could return NULL
brltty-6.9.1/python3/Programs/cmdargs.c:36:3: danger: ‘arguments’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 34| CommandArguments *arguments;
# 35| arguments = malloc(sizeof(*arguments));
# 36|-> arguments->queue = newQueue(NULL, NULL);
# 37| return arguments;
# 38| }
Error: GCC_ANALYZER_WARNING (CWE-688):
brltty-6.9.1/python3/Programs/cmdput.c:203:9: warning[-Wanalyzer-null-argument]: use of NULL ‘paragraphText’ where non-null expected
brltty-6.9.1/python3/Programs/cmdput.c:173:10: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Programs/cmdput.c:174:33: branch_true: ...to here
brltty-6.9.1/python3/Programs/cmdput.c:179:10: branch_false: following ‘false’ branch (when ‘text’ is non-NULL)...
brltty-6.9.1/python3/Programs/cmdput.c:180:14: branch_false: ...to here
brltty-6.9.1/python3/Programs/cmdput.c:182:10: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Programs/cmdput.c:187:12: branch_false: following ‘false’ branch (when ‘paragraphLength == 0’)...
brltty-6.9.1/python3/Programs/cmdput.c:189:12: branch_false: ...to here
brltty-6.9.1/python3/Programs/cmdput.c:189:12: branch_false: following ‘false’ branch (when ‘paragraphSize >= newLength’)...
brltty-6.9.1/python3/Programs/cmdput.c:202:12: branch_false: ...to here
brltty-6.9.1/python3/Programs/cmdput.c:202:12: branch_false: following ‘false’ branch (when ‘paragraphLength == 0’)...
brltty-6.9.1/python3/Programs/cmdput.c:203:16: branch_false: ...to here
brltty-6.9.1/python3/Programs/cmdput.c:203:16: release_memory: ‘paragraphText’ is NULL
brltty-6.9.1/python3/Programs/cmdput.c:203:9: danger: argument 1 (‘paragraphText + paragraphLength’) NULL where non-null expected
# 201|
# 202| if (extendingParagraph) paragraphText[paragraphLength++] = ' ';
# 203|-> memcpy(¶graphText[paragraphLength], text, textLength);
# 204| paragraphText[paragraphLength += textLength] = 0;
# 205| } else {
Error: GCC_ANALYZER_WARNING (CWE-457):
brltty-6.9.1/python3/Programs/scr.c:230:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘candidates[<unknown>]’
brltty-6.9.1/python3/Programs/scr.c:196:6: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
brltty-6.9.1/python3/Programs/scr.c:200:7: branch_false: ...to here
brltty-6.9.1/python3/Programs/scr.c:200:6: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Programs/scr.c:200:6: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:207:30: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.9.1/python3/Programs/scr.c:208:38: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:212:23: branch_false: following ‘false’ branch (when ‘discardedCount <= j’)...
brltty-6.9.1/python3/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/python3/Programs/scr.c:218:10: branch_false: following ‘false’ branch (when ‘found == 0’)...
brltty-6.9.1/python3/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/python3/Programs/scr.c:222:23: branch_false: following ‘false’ branch (when ‘candidateCount <= j’)...
brltty-6.9.1/python3/Programs/scr.c:240:10: branch_false: ...to here
brltty-6.9.1/python3/Programs/scr.c:240:10: branch_true: following ‘true’ branch (when ‘candidateCount <= 15’)...
brltty-6.9.1/python3/Programs/scr.c:241:9: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:207:30: branch_true: following ‘true’ branch (when ‘i < count’)...
brltty-6.9.1/python3/Programs/scr.c:208:38: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:212:23: branch_false: following ‘false’ branch (when ‘discardedCount <= j’)...
brltty-6.9.1/python3/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/python3/Programs/scr.c:218:10: branch_false: following ‘false’ branch (when ‘found == 0’)...
brltty-6.9.1/python3/Programs/scr.c:218:10: branch_false: ...to here
brltty-6.9.1/python3/Programs/scr.c:222:23: branch_true: following ‘true’ branch (when ‘candidateCount > j’)...
brltty-6.9.1/python3/Programs/scr.c:223:38: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:223:12: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Programs/scr.c:225:14: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:225:14: branch_true: following ‘true’ branch (when ‘discardedCount <= 15’)...
brltty-6.9.1/python3/Programs/scr.c:226:23: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:229:27: branch_true: following ‘true’ branch...
brltty-6.9.1/python3/Programs/scr.c:230:40: branch_true: ...to here
brltty-6.9.1/python3/Programs/scr.c:230:13: danger: use of uninitialized value ‘candidates[<unknown>]’ here
# 228| // Remove from candidates by shifting
# 229| for (int k = j; k < candidateCount - 1; k++) {
# 230|-> candidates[k] = candidates[k + 1];
# 231| }
# 232| candidateCount--;