libcamera-0.3.2-1.fc42

List of Findings

Error: CPPCHECK_WARNING (CWE-562): [#def1]
libcamera-0.3.2-build/libcamera-0.3.2/src/apps/cam/capture_script.cpp:612: error[returnDanglingLifetime]: Returning object that points to local variable 'values' that will be invalid when returning.
#  610|   	}
#  611|   
#  612|-> 	return value;
#  613|   }
#  614|   

Error: CPPCHECK_WARNING (CWE-628): [#def2]
libcamera-0.3.2-build/libcamera-0.3.2/src/libcamera/base/object.cpp:117: warning[eraseIteratorOutOfBoundsCond]: Either the condition 'it!=parent_->children_.end()' is redundant or function 'erase()' is called on the iterator 'it' which is out of bounds.
#  115|   				    parent_->children_.end(), this);
#  116|   		ASSERT(it != parent_->children_.end());
#  117|-> 		parent_->children_.erase(it);
#  118|   	}
#  119|   

Error: CPPCHECK_WARNING (CWE-457): [#def3]
libcamera-0.3.2-build/libcamera-0.3.2/src/libcamera/control_serializer.cpp:393: error[uninitvar]: Uninitialized variable: type
#  391|   	ControlValue value;
#  392|   
#  393|-> 	value.reserve(type, isArray, count);
#  394|   	buffer.read(value.data());
#  395|   

Error: CPPCHECK_WARNING (CWE-476): [#def4]
libcamera-0.3.2-build/libcamera-0.3.2/src/libcamera/pipeline/ipu3/ipu3.cpp:593: warning[nullPointer]: Possible null pointer dereference: mainCfg
#  591|   	 */
#  592|   	if (!vfCfg) {
#  593|-> 		ret = imgu->configureViewfinder(*mainCfg, &outputFormat);
#  594|   		if (ret)
#  595|   			return ret;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
libcamera-0.3.2-build/libcamera-0.3.2/utils/ipu3/ipu3-unpack.c: scope_hint: In function ‘main’
libcamera-0.3.2-build/libcamera-0.3.2/utils/ipu3/ipu3-unpack.c:43:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(argv[1], 0)’
#   41|   	}
#   42|   
#   43|-> 	out_fd = open(argv[2], O_WRONLY | O_TRUNC | O_CREAT, 0644);
#   44|   	if (out_fd == -1) {
#   45|   		fprintf(stderr, "Failed to open output file '%s': %s\n",

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-36.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibcamera-0.3.2-1.fc42
store-results-to/tmp/tmpygdp3hvv/libcamera-0.3.2-1.fc42.tar.xz
time-created2024-11-13 01:22:04
time-finished2024-11-13 01:26:05
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpygdp3hvv/libcamera-0.3.2-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpygdp3hvv/libcamera-0.3.2-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9