Error: SHELLCHECK_WARNING: [#def1] /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: [#def2] /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): [#def3] /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: [#def4] /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): [#def5] /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): [#def6] /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): [#def7] /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): [#def8] /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): [#def9] 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): [#def10] 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): [#def11] 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): [#def12] 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): [#def13] 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): [#def14] 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): [#def15] 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): [#def16] 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): [#def17] 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): [#def18] 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): [#def19] 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): [#def20] 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): [#def21] 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): [#def22] 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): [#def23] 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): [#def24] 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): [#def25] 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): [#def26] 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): [#def27] 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): [#def28] 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): [#def29] 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): [#def30] 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): [#def31] 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): [#def32] 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): [#def33] 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): [#def34] 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): [#def35] 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): [#def36] 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): [#def37] 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): [#def38] 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): [#def39] 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): [#def40] 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): [#def41] 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): [#def42] 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): [#def43] 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): [#def44] 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--;
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.95.0 |
| diffbase-analyzer-version-cppcheck | 2.20.0 |
| diffbase-analyzer-version-gcc | 16.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.1.1 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-158.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | brltty-6.8-8.fc44 |
| diffbase-store-results-to | /tmp/tmpluwo6y8n/brltty-6.8-8.fc44.tar.xz |
| diffbase-time-created | 2026-06-01 11:31:55 |
| diffbase-time-finished | 2026-06-01 11:43:17 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpluwo6y8n/brltty-6.8-8.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpluwo6y8n/brltty-6.8-8.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-158.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | brltty-6.9.1-3.fc45 |
| store-results-to | /tmp/tmpwoqc2zgj/brltty-6.9.1-3.fc45.tar.xz |
| time-created | 2026-06-01 11:43:35 |
| time-finished | 2026-06-01 11:54:05 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpwoqc2zgj/brltty-6.9.1-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpwoqc2zgj/brltty-6.9.1-3.fc45.src.rpm' |
| tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |