Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-457): [#def1]
less-679/decode.c: scope_hint: In function ‘cmd_decode’
less-679/decode.c:785:20: warning[-Wmaybe-uninitialized]: ‘mlen’ may be used uninitialized
#  785 |                 if (mlen >= match_len)
#      |                    ^
less-679/decode.c:783:24: note: ‘mlen’ was declared here
#  783 |                 size_t mlen;
#      |                        ^~~~
#  783|   		size_t mlen;
#  784|   		int taction = cmd_search(cmd, t->t_start, t->t_end, &tsp, &mlen);
#  785|-> 		if (mlen >= match_len)
#  786|   		{
#  787|   			match_len = mlen;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def2]
less-679/search.c:806:65: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*hl.hl_attr’
less-679/search.c:1981:12: enter_function: entry to ‘hist_pattern’
less-679/search.c:1995:12: branch_true: following ‘true’ branch...
less-679/search.c:1996:17: call_function: calling ‘hilite_screen’ from ‘hist_pattern’
#  804|   		if (hl->hl_startpos < p->r.hl_startpos)
#  805|   		{
#  806|-> 			if (hl->hl_endpos > p->r.hl_startpos && hl->hl_attr == p->r.hl_attr)
#  807|   				hl->hl_endpos = p->r.hl_startpos;
#  808|   			if (p->left != NULL)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def3]
less-679/search.c:815:57: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*hl.hl_attr’
less-679/search.c:1981:12: enter_function: entry to ‘hist_pattern’
less-679/search.c:1995:12: branch_true: following ‘true’ branch...
less-679/search.c:1996:17: call_function: calling ‘hilite_screen’ from ‘hist_pattern’
#  813|   			break;
#  814|   		}
#  815|-> 		if (hl->hl_startpos < p->r.hl_endpos && hl->hl_attr == p->r.hl_attr) {
#  816|   			hl->hl_startpos = p->r.hl_endpos;
#  817|   			if (hl->hl_startpos >= hl->hl_endpos)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def4]
less-679/search.c:834:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*hl.hl_attr’
less-679/search.c:1981:12: enter_function: entry to ‘hist_pattern’
less-679/search.c:1995:12: branch_true: following ‘true’ branch...
less-679/search.c:1996:17: call_function: calling ‘hilite_screen’ from ‘hist_pattern’
#  832|   	 */
#  833|   	if (hl->hl_startpos < p->r.hl_startpos) {
#  834|-> 		if (hl->hl_attr == p->r.hl_attr)
#  835|   		{
#  836|   			if (hl->hl_endpos == p->r.hl_startpos)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
less-679/search.c:856:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*hl.hl_attr’
less-679/search.c:1981:12: enter_function: entry to ‘hist_pattern’
less-679/search.c:1995:12: branch_true: following ‘true’ branch...
less-679/search.c:1996:17: call_function: calling ‘hilite_screen’ from ‘hist_pattern’
#  854|   		p->prev = n;
#  855|   	} else {
#  856|-> 		if (hl->hl_attr == p->r.hl_attr)
#  857|   		{
#  858|   			if (p->r.hl_endpos == hl->hl_startpos)

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.90.0
diffbase-analyzer-version-cppcheck2.18.3
diffbase-analyzer-version-gcc15.2.1
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-223.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-nameless-685-1.fc44
diffbase-store-results-to/tmp/tmpr5l1su2n/less-685-1.fc44.tar.xz
diffbase-time-created2025-10-28 19:00:34
diffbase-time-finished2025-10-28 19:01:59
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpr5l1su2n/less-685-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpr5l1su2n/less-685-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-223.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameless-679-2.fc43
store-results-to/tmp/tmp2rj541p_/less-679-2.fc43.tar.xz
time-created2025-10-28 18:58:31
time-finished2025-10-28 19:00:23
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmp2rj541p_/less-679-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp2rj541p_/less-679-2.fc43.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9