libqalculate-5.5.2-2.fc43

List of Findings

Error: CPPCHECK_WARNING (CWE-664): [#def1]
libqalculate-5.5.2/libqalculate/MathStructure-eval.cc:1856: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 1854|   			m_cis->ref();
# 1855|   			ERASE(i_cis)
# 1856|-> 			multiply_nocopy(m_cis);
# 1857|   		}
# 1858|   	}

Error: CPPCHECK_WARNING (CWE-664): [#def2]
libqalculate-5.5.2/libqalculate/MathStructure-factor.cc:2013: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 2011|   										mcur = &CHILD(i);
# 2012|   									}
# 2013|-> 									while(mcur && i + 1 < SIZE) {
# 2014|   										if(CHILD(i + 1).isPower()) {
# 2015|   											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.5.2/libqalculate/MathStructure-print.cc:2752: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 2750|   					munc->ref();
# 2751|   					CLEAR
# 2752|-> 					APPEND_POINTER(mmid)
# 2753|   					APPEND_POINTER(munc)
# 2754|   					APPEND(m_zero)

Error: CPPCHECK_WARNING (CWE-664): [#def4]
libqalculate-5.5.2/libqalculate/MathStructure-print.cc:2753: error[invalidContainer]: Using pointer to member variable 'v_subs' that may be invalid.
# 2751|   					CLEAR
# 2752|   					APPEND_POINTER(mmid)
# 2753|-> 					APPEND_POINTER(munc)
# 2754|   					APPEND(m_zero)
# 2755|   				}

Error: CPPCHECK_WARNING (CWE-476): [#def5]
libqalculate-5.5.2/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.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-29.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibqalculate-5.5.2-2.fc43
store-results-to/tmp/tmp6ik5aelw/libqalculate-5.5.2-2.fc43.tar.xz
time-created2025-04-25 14:09:19
time-finished2025-04-25 14:13:55
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp6ik5aelw/libqalculate-5.5.2-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp6ik5aelw/libqalculate-5.5.2-2.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9