libqalculate-5.8.1-1.fc44

List of Findings

Error: CPPCHECK_WARNING (CWE-664): [#def1]
libqalculate-5.8.1/libqalculate/MathStructure-eval.cc:1864: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 1862|   			m_cis->ref();
# 1863|   			ERASE(i_cis)
# 1864|-> 			multiply_nocopy(m_cis);
# 1865|   		}
# 1866|   	}

Error: CPPCHECK_WARNING (CWE-664): [#def2]
libqalculate-5.8.1/libqalculate/MathStructure-factor.cc:2015: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 2013|   										mcur = &CHILD(i);
# 2014|   									}
# 2015|-> 									while(mcur && i + 1 < SIZE) {
# 2016|   										if(CHILD(i + 1).isPower()) {
# 2017|   											if(CHILD(i + 1)[0].isAddition() && CHILD(i + 1)[1].isNumber() && mcur->equals(CHILD(i + 1)[0])) {

Error: CPPCHECK_WARNING (CWE-664): [#def3]
libqalculate-5.8.1/libqalculate/MathStructure-print.cc:2765: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 2763|   					munc->ref();
# 2764|   					CLEAR
# 2765|-> 					APPEND_POINTER(mmid)
# 2766|   					APPEND_POINTER(munc)
# 2767|   					APPEND(m_zero)

Error: CPPCHECK_WARNING (CWE-664): [#def4]
libqalculate-5.8.1/libqalculate/MathStructure-print.cc:2766: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 2764|   					CLEAR
# 2765|   					APPEND_POINTER(mmid)
# 2766|-> 					APPEND_POINTER(munc)
# 2767|   					APPEND(m_zero)
# 2768|   				}

Error: CPPCHECK_WARNING (CWE-476): [#def5]
libqalculate-5.8.1/libqalculate/util.cc:150: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buffer
#  148|   	// qgcvt(value, precision, buffer);
#  149|   	char *buffer = (char*) malloc((precision + 21) * sizeof(char));
#  150|-> 	snprintf(buffer, precision + 21, "%.*G", precision, value);
#  151|   	string stmp = buffer;
#  152|   	free(buffer);

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
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-26.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-namelibqalculate-5.8.1-1.fc44
store-results-to/tmp/tmpfozh4b7t/libqalculate-5.8.1-1.fc44.tar.xz
time-created2025-10-28 19:13:35
time-finished2025-10-28 19:18:21
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpfozh4b7t/libqalculate-5.8.1-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/tmpfozh4b7t/libqalculate-5.8.1-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9