Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/camera3.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/camera_common.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/fb.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/gralloc.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/hardware.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/metadata/camera_metadata_hidden.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/metadata/system/camera_metadata.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/metadata/system/camera_metadata_tags.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/metadata/system/camera_vendor_tags.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/android/log.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/cutils/compiler.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/cutils/native_handle.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/system/camera.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/system/graphics.h
Examining data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/system/window.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/bound_method.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/buffer.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/camera.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/camera_manager.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/controls.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/event_dispatcher.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/event_notifier.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/file_descriptor.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/framebuffer_allocator.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/geometry.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/camera_controls.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/camera_sensor.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/control_serializer.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/control_validator.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/device_enumerator.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/device_enumerator_sysfs.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/device_enumerator_udev.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/event_dispatcher_poll.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/file.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/formats.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/ipa_context_wrapper.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/ipa_manager.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/ipa_module.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/ipa_proxy.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/ipc_unixsocket.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/log.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/media_device.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/media_object.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/message.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/pipeline_handler.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/process.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/pub_key.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/semaphore.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/thread.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/utils.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_controls.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_device.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_pixelformat.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_subdevice.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_videodevice.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/ipa_controls.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/ipa_interface.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/ipa_module_info.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/ipa_vimc.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/raspberrypi.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/rkisp1.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/logging.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/object.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/pixel_format.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/request.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/signal.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/span.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/stream.h
Examining data/libcamera-0~git20200629+e7aa92a/include/libcamera/timer.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/bcm2835-isp.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/drm_fourcc.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/media-bus-format.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/media.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/rkisp1-config.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/v4l2-common.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/v4l2-controls.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/v4l2-mediabus.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/v4l2-subdev.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/vc_sm_cma_ioctl.h
Examining data/libcamera-0~git20200629+e7aa92a/include/linux/videodev2.h
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera3_hal.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_device.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_device.h
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_hal_manager.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_hal_manager.h
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_metadata.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_metadata.h
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_ops.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/android/camera_ops.h
Examining data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c
Examining data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata_tag_info.c
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/buffer_writer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/buffer_writer.h
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/capture.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/capture.h
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/event_loop.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/event_loop.h
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/main.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/main.h
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/options.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/options.h
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/stream_options.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/cam/stream_options.h
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamera-utils.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamera-utils.h
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamera.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcameraallocator.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcameraallocator.h
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamerapad.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamerapad.h
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamerapool.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamerapool.h
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcameraprovider.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcameraprovider.h
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamerasrc.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/gstreamer/gstlibcamerasrc.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/libipa/ipa_interface_wrapper.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/libipa/ipa_interface_wrapper.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/cam_helper.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/cam_helper.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/cam_helper_imx219.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/cam_helper_imx477.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/cam_helper_ov5647.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/agc_algorithm.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/agc_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/algorithm.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/algorithm.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/alsc_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/awb_algorithm.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/awb_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/black_level_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/camera_mode.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/ccm_algorithm.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/ccm_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/contrast_algorithm.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/contrast_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/controller.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/controller.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/device_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/dpc_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/focus_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/geq_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/histogram.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/histogram.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/logging.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/lux_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/metadata.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/noise_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/pwl.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/pwl.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/agc.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/agc.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/alsc.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/awb.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/awb.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/black_level.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/black_level.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/ccm.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/ccm.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/contrast.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/dpc.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/dpc.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/focus.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/focus.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/geq.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/geq.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/lux.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/lux.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/noise.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/noise.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/sdn.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/sdn.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/sharpen.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/sdn_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/sharpen_algorithm.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/sharpen_status.h
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/md_parser.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/md_parser.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/md_parser_rpi.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/md_parser_rpi.hpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/raspberrypi.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/rkisp1/rkisp1.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/ipa/vimc/vimc.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/bound_method.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/buffer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/byte_stream_buffer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/camera.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/camera_controls.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/camera_manager.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/camera_sensor.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/control_serializer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/control_validator.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/controls.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/device_enumerator.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/device_enumerator_sysfs.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/device_enumerator_udev.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/event_dispatcher.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/event_dispatcher_poll.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/event_notifier.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/file.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/file_descriptor.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/formats.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/framebuffer_allocator.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/geometry.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_context_wrapper.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_controls.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_interface.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_manager.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_module.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_proxy.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipc_unixsocket.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/log.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/media_device.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/media_object.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/message.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/object.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/cio2.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/cio2.h
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/imgu.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/imgu.h
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/ipu3.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.h
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/raspberrypi/vcsm.h
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/timeline.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/timeline.h
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/converter.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/converter.h
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/simple.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/vimc/vimc.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline_handler.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pixel_format.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/process.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/proxy/ipa_proxy_linux.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/proxy/ipa_proxy_thread.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/pub_key.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/request.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/semaphore.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/signal.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/stream.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/thread.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/timer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/utils.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_controls.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_device.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_pixelformat.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_subdevice.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_videodevice.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/dng_writer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/dng_writer.h
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/format_converter.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/format_converter.h
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/main.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/main_window.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/main_window.h
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/viewfinder.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/qcam/viewfinder.h
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera.h
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_file.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_file.h
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_proxy.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_proxy.h
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_compat.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_compat_manager.cpp
Examining data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_compat_manager.h
Examining data/libcamera-0~git20200629+e7aa92a/test/byte-stream-buffer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/camera-sensor.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/camera/buffer_import.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/camera/capture.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/camera/configuration_default.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/camera/configuration_set.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/camera/statemachine.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/controls/control_info.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/controls/control_info_map.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/controls/control_list.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/controls/control_value.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/event-dispatcher.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/event-thread.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/event.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/file-descriptor.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/file.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/geometry.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/hotplug-cameras.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/ipa/ipa_interface_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/ipa/ipa_module_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/ipa/ipa_wrappers_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/libtest/buffer_source.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/libtest/buffer_source.h
Examining data/libcamera-0~git20200629+e7aa92a/test/libtest/camera_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/libtest/camera_test.h
Examining data/libcamera-0~git20200629+e7aa92a/test/libtest/test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/libtest/test.h
Examining data/libcamera-0~git20200629+e7aa92a/test/list-cameras.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/log/log_api.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/log/log_process.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/media_device/media_device_acquire.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/media_device/media_device_link_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/media_device/media_device_print_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/media_device/media_device_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/media_device/media_device_test.h
Examining data/libcamera-0~git20200629+e7aa92a/test/message.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/object-invoke.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/object.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/pipeline/ipu3/ipu3_pipeline_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/pipeline/rkisp1/rkisp1_pipeline_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/pixel-format.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/process/process_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/serialization/control_serialization.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/serialization/serialization_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/serialization/serialization_test.h
Examining data/libcamera-0~git20200629+e7aa92a/test/signal-threads.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/signal.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/span.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/stream/stream_formats.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/threads.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/timer-thread.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/timer.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/utils.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_subdevice/list_formats.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_subdevice/test_formats.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_subdevice/v4l2_subdevice_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_subdevice/v4l2_subdevice_test.h
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/buffer_cache.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/buffer_sharing.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/capture_async.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/controls.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/double_open.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/formats.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/request_buffers.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/stream_on_off.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/v4l2_videodevice_test.cpp
Examining data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/v4l2_videodevice_test.h
Examining data/libcamera-0~git20200629+e7aa92a/utils/ipu3/ipu3-unpack.c

FINAL RESULTS:

data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/android/log.h:106:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__ ((format(printf, 3, 4)))
data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/android/log.h:109:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__ ((format(printf, 3, 4)))
data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/android/log.h:133:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__ ((format(printf, 3, 4)))
data/libcamera-0~git20200629+e7aa92a/include/android/system/core/include/android/log.h:136:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__ ((format(printf, 3, 4)))
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:25:20:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ALOGE(...) fprintf(stderr, LOG_TAG __VA_ARGS__)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_proxy.cpp:175:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
			if (!access(proxyPath.c_str(), X_OK))
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_proxy.cpp:195:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (!access(proxyPath.c_str(), X_OK))
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_proxy.cpp:203:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (!access(proxyPath.c_str(), X_OK))
data/libcamera-0~git20200629+e7aa92a/src/libcamera/media_object.cpp:343:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	int ret = ::access(deviceNode.c_str(), R_OK | W_OK);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/process.cpp:280:3:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execv(path.c_str(), (char **)argv);
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:210:4:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			execl("/proc/self/exe", "/proc/self/exe",
data/libcamera-0~git20200629+e7aa92a/src/cam/options.cpp:434:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		int c = getopt_long(argc, argv, shortOptions, longOptions, nullptr);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/utils.cpp:78:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	return getenv(name);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/utils.cpp:391:15:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	char *real = realpath(path.c_str(), nullptr);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/utils.cpp:425:15:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	char *real = realpath(path.c_str(), nullptr);
data/libcamera-0~git20200629+e7aa92a/test/log/log_process.cpp:58:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		random_device random;
data/libcamera-0~git20200629+e7aa92a/test/log/log_process.cpp:59:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		num_ = random();
data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/fb.h:163:29:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return module->methods->open(module,
data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/gralloc.h:375:29:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return module->methods->open(module, 
data/libcamera-0~git20200629+e7aa92a/include/android/hardware/libhardware/include/hardware/hardware.h:159:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int (*open)(const struct hw_module_t* module, const char* id,
data/libcamera-0~git20200629+e7aa92a/include/android/metadata/system/camera_metadata.h:46:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *camera_metadata_section_names[ANDROID_SECTION_COUNT];
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/file.h:44:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	bool open(OpenMode mode);
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/media_device.h:61:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open();
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_device.h:38:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open(unsigned int flags);
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_subdevice.h:45:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open();
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_videodevice.h:178:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open();
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_videodevice.h:179:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open(int handle, enum v4l2_buf_type type);
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/v4l2_videodevice.h:262:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open();
data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/ipa_module_info.h:19:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pipelineName[256];
data/libcamera-0~git20200629+e7aa92a/include/libcamera/ipa/ipa_module_info.h:20:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[256];
data/libcamera-0~git20200629+e7aa92a/include/linux/media.h:28:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char driver[16];
data/libcamera-0~git20200629+e7aa92a/include/linux/media.h:29:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char model[32];
data/libcamera-0~git20200629+e7aa92a/include/linux/media.h:30:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char serial[40];
data/libcamera-0~git20200629+e7aa92a/include/linux/media.h:31:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char bus_info[32];
data/libcamera-0~git20200629+e7aa92a/include/linux/media.h:151:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[32];
data/libcamera-0~git20200629+e7aa92a/include/linux/media.h:282:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[64];
data/libcamera-0~git20200629+e7aa92a/include/linux/videodev2.h:886:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char APP_data[60];      /* Data in the JPEG APPn segment. */
data/libcamera-0~git20200629+e7aa92a/include/linux/videodev2.h:889:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char COM_data[60];      /* Data in JPEG COM segment */
data/libcamera-0~git20200629+e7aa92a/include/linux/videodev2.h:1741:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		     name[32];
data/libcamera-0~git20200629+e7aa92a/include/linux/videodev2.h:2366:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char name[32];
data/libcamera-0~git20200629+e7aa92a/include/linux/videodev2.h:2383:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[32];
data/libcamera-0~git20200629+e7aa92a/src/android/camera3_hal.cpp:74:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	int id = atoi(name);
data/libcamera-0~git20200629+e7aa92a/src/android/camera3_hal.cpp:75:39:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	CameraDevice *camera = cameraManager.open(id, module);
data/libcamera-0~git20200629+e7aa92a/src/android/camera_device.cpp:335:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int CameraDevice::open(const hw_module_t *hardwareModule)
data/libcamera-0~git20200629+e7aa92a/src/android/camera_device.h:36:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open(const hw_module_t *hardwareModule);
data/libcamera-0~git20200629+e7aa92a/src/android/camera_hal_manager.cpp:79:33:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
CameraDevice *CameraHalManager::open(unsigned int id,
data/libcamera-0~git20200629+e7aa92a/src/android/camera_hal_manager.cpp:88:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (camera->open(hardwareModule))
data/libcamera-0~git20200629+e7aa92a/src/android/camera_hal_manager.h:28:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	CameraDevice *open(unsigned int id, const hw_module_t *module);
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:207:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *camera_metadata_type_names[NUM_TYPES] = {
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:245:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer, src, src_size);
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:363:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(get_entries(metadata), get_entries(src),
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:365:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(get_data(metadata), get_data(src),
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:601:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(get_entries(dst) + dst->entry_count, get_entries(src),
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:603:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(get_data(dst) + dst->data_count, get_data(src),
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:674:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(entry->data.value, data,
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:678:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(get_data(dst) + entry->data.offset, data,
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:885:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(get_data(dst) + entry->data.offset, data, data_payload_bytes);
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:890:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(get_data(dst) + entry->data.offset, data, data_payload_bytes);
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:895:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(entry->data.value, data,
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata.c:1138:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char value_string_tmp[CAMERA_METADATA_ENUM_STRING_MAX_SIZE];
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata_tag_info.c:34:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *camera_metadata_section_names[ANDROID_SECTION_COUNT] = {
data/libcamera-0~git20200629+e7aa92a/src/cam/buffer_writer.cpp:61:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(filename.c_str(), O_CREAT | O_WRONLY |
data/libcamera-0~git20200629+e7aa92a/src/cam/options.cpp:391:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char shortOptions[options_.size() * 3 + 2];
data/libcamera-0~git20200629+e7aa92a/src/ipa/libipa/ipa_interface_wrapper.cpp:214:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(opData.data.data(), data->data,
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/agc_status.h:25:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char exposure_mode[32];
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/agc_status.h:26:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char constraint_mode[32];
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/agc_status.h:27:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char metering_mode[32];
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/awb_status.h:17:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mode[32];
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/alsc.cpp:355:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(cal_table, calibrations.front().table,
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/rpi/alsc.cpp:360:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(cal_table, calibrations.back().table,
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/md_parser_rpi.cpp:23:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&metadata, data, sizeof(rpiMetadata));
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/raspberrypi.cpp:1033:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		std::memcpy(grid + 2 * w * h, grid + w * h, w * h * sizeof(uint16_t));
data/libcamera-0~git20200629+e7aa92a/src/ipa/vimc/vimc.cpp:75:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!conf.open(File::ReadOnly)) {
data/libcamera-0~git20200629+e7aa92a/src/ipa/vimc/vimc.cpp:106:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = ::open(VIMC_IPA_FIFO_PATH, O_WRONLY);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/buffer.cpp:282:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dstmem, srcmem, src->planes_[i].length);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/byte_stream_buffer.cpp:316:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data, read_, size);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/byte_stream_buffer.cpp:337:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(write_, data, size);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/camera_sensor.cpp:204:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int ret = subdev_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/controls.cpp:339:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(storage.data(), data, storage.size());
data/libcamera-0~git20200629+e7aa92a/src/libcamera/device_enumerator_sysfs.cpp:132:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ueventFile.open("/sys/dev/char/" + std::to_string(major) + ":" +
data/libcamera-0~git20200629+e7aa92a/src/libcamera/file.cpp:158:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool File::open(File::OpenMode mode)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/file.cpp:167:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd_ = ::open(name_.c_str(), flags);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_manager.cpp:307:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!file.open(File::ReadOnly))
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_module.cpp:278:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!file.open(File::ReadOnly)) {
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_module.cpp:297:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&info_, info.data(), info.size());
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_module.cpp:320:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!sign.open(File::ReadOnly)) {
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_module.cpp:328:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(signature_.data(), data.data(), data.size());
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipc_unixsocket.cpp:246:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[CMSG_SPACE(num * sizeof(uint32_t))];
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipc_unixsocket.cpp:262:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(CMSG_DATA(cmsg), fds, num * sizeof(uint32_t));
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipc_unixsocket.cpp:281:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[CMSG_SPACE(num * sizeof(uint32_t))];
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipc_unixsocket.cpp:306:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(fds, CMSG_DATA(cmsg), num * sizeof(uint32_t));
data/libcamera-0~git20200629+e7aa92a/src/libcamera/media_device.cpp:110:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (open())
data/libcamera-0~git20200629+e7aa92a/src/libcamera/media_device.cpp:218:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/media_device.cpp:472:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int MediaDevice::open()
data/libcamera-0~git20200629+e7aa92a/src/libcamera/media_device.cpp:479:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int ret = ::open(deviceNode_.c_str(), O_RDWR);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/cio2.cpp:118:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = csi2_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/cio2.cpp:124:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = output_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/imgu.cpp:48:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = imgu_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/imgu.cpp:53:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = input_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/imgu.cpp:59:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = output_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/imgu.cpp:65:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = viewfinder_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/ipu3/imgu.cpp:70:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = stat_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp:930:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (stream->dev()->open())
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/raspberrypi/vcsm.h:28:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		vcsmHandle_ = ::open(VCSM_CMA_DEVICE_NAME, O_RDWR, 0);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/raspberrypi/vcsm.h:65:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(alloc.name, name, 32);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/rkisp1.cpp:985:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (isp_->open() < 0)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/rkisp1.cpp:989:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (resizer_->open() < 0)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/rkisp1.cpp:994:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (video_->open() < 0)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/rkisp1.cpp:998:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (stat_->open() < 0)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/rkisp1/rkisp1.cpp:1002:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (param_->open() < 0)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/converter.cpp:52:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int SimpleConverter::open()
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/converter.cpp:57:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	return m2m_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/converter.h:33:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/simple.cpp:721:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (converter_->open() < 0) {
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/simple.cpp:765:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int ret = subdev->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/simple/simple.cpp:803:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (video->open() < 0)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp:415:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = video_->open();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/vimc/vimc.cpp:458:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (debayer_->open())
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/vimc/vimc.cpp:462:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (scaler_->open())
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/vimc/vimc.cpp:466:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (video_->open())
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pipeline/vimc/vimc.cpp:472:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (raw_->open())
data/libcamera-0~git20200629+e7aa92a/src/libcamera/pixel_format.cpp:115:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char fourcc[7] = { '<',
data/libcamera-0~git20200629+e7aa92a/src/libcamera/process.cpp:273:33:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		const char **argv = new const char *[args.size() + 2];
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_device.cpp:72:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int V4L2Device::open(unsigned int flags)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_pixelformat.cpp:146:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ss[8] = { static_cast<char>(fourcc_ & 0x7f),
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_pixelformat.cpp:157:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(ss, "-BE");
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_subdevice.cpp:247:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int V4L2Subdevice::open()
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_subdevice.cpp:249:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	return V4L2Device::open(O_RDWR);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_videodevice.cpp:501:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int V4L2VideoDevice::open()
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_videodevice.cpp:505:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = V4L2Device::open(O_RDWR | O_NONBLOCK);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_videodevice.cpp:593:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int V4L2VideoDevice::open(int handle, enum v4l2_buf_type type)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_videodevice.cpp:1715:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int V4L2M2MDevice::open()
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_videodevice.cpp:1735:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = output_->open(fd, V4L2_BUF_TYPE_VIDEO_OUTPUT);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/v4l2_videodevice.cpp:1739:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	ret = capture_->open(fd, V4L2_BUF_TYPE_VIDEO_CAPTURE);
data/libcamera-0~git20200629+e7aa92a/src/qcam/dng_writer.cpp:434:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char strTime[20];
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera.cpp:31:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int V4L2Camera::open()
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera.h:40:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open();
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_file.cpp:20:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	proxy_->open(this);
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_proxy.cpp:44:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int V4L2CameraProxy::open(V4L2CameraFile *file)
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_proxy.cpp:65:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int ret = vcam_->open();
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_proxy.h:32:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int open(V4L2CameraFile *file);
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_compat.cpp:31:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
LIBCAMERA_PUBLIC int open(const char *path, int oflag, ...)
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_compat.cpp:44:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	return open(path, oflag);
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_compat.cpp:60:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	return open(path, oflag);
data/libcamera-0~git20200629+e7aa92a/test/event-thread.cpp:81:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char data_[16];
data/libcamera-0~git20200629+e7aa92a/test/event.cpp:123:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char data_[16];
data/libcamera-0~git20200629+e7aa92a/test/file-descriptor.cpp:31:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd_ = open("/tmp", O_TMPFILE | O_RDWR, S_IRUSR | S_IWUSR);
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:29:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		int fd = mkstemp(&fileName_.front());
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:82:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (file.open(File::ReadWrite)) {
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:121:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (file.open(File::ReadWrite)) {
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:151:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (!file.open(File::ReadWrite)) {
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:186:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		file.open(File::ReadOnly);
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:231:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		file.open(File::ReadWrite);
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:245:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(data.data(), "LIBCAMERA", 9);
data/libcamera-0~git20200629+e7aa92a/test/file.cpp:267:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(data.data(), "LIBCAMERA", 9);
data/libcamera-0~git20200629+e7aa92a/test/ipa/ipa_interface_test.cpp:76:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		ret = open(VIMC_IPA_FIFO_PATH, O_RDONLY | O_NONBLOCK);
data/libcamera-0~git20200629+e7aa92a/test/ipa/ipa_wrappers_test.cpp:274:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (subdev_->open() < 0) {
data/libcamera-0~git20200629+e7aa92a/test/ipa/ipa_wrappers_test.cpp:289:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd_ = open("/tmp", O_TMPFILE | O_RDWR, 0600);
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:108:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(response.data.data() + 1, &size, sizeof(size));
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:134:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			int outfd = open("/tmp", O_TMPFILE | O_RDWR,
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:144:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char buf[32];
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:294:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(message.data.data() + 1, &size, sizeof(size));
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:307:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		static const char *strings[2] = {
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:316:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			fds[i] = open("/tmp", O_TMPFILE | O_RDWR,
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:337:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[len];
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:465:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open("/proc/self/exe", O_RDONLY);
data/libcamera-0~git20200629+e7aa92a/test/libtest/buffer_source.cpp:60:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (video->open()) {
data/libcamera-0~git20200629+e7aa92a/test/log/log_api.cpp:79:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open("/tmp", O_TMPFILE | O_RDWR, S_IRUSR | S_IWUSR);
data/libcamera-0~git20200629+e7aa92a/test/log/log_api.cpp:85:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char path[32];
data/libcamera-0~git20200629+e7aa92a/test/log/log_api.cpp:96:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[1000];
data/libcamera-0~git20200629+e7aa92a/test/log/log_process.cpp:100:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open(logPath_.c_str(), O_RDONLY, S_IRUSR);
data/libcamera-0~git20200629+e7aa92a/test/log/log_process.cpp:106:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[200];
data/libcamera-0~git20200629+e7aa92a/test/v4l2_subdevice/v4l2_subdevice_test.cpp:56:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (scaler_->open()) {
data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/buffer_sharing.cpp:48:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		ret = output_->open();
data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/double_open.cpp:28:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		ret = capture_->open();
data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/v4l2_m2mdevice.cpp:88:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (vim2m_->open()) {
data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/v4l2_videodevice_test.cpp:56:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (capture_->open())
data/libcamera-0~git20200629+e7aa92a/test/v4l2_videodevice/v4l2_videodevice_test.cpp:69:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (debayer_->open())
data/libcamera-0~git20200629+e7aa92a/utils/ipu3/ipu3-unpack.c:35:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	in_fd = open(argv[1], O_RDONLY);
data/libcamera-0~git20200629+e7aa92a/utils/ipu3/ipu3-unpack.c:42:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	out_fd = open(argv[2], O_WRONLY | O_TRUNC | O_CREAT, 0644);
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:35:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read(T *t)
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:37:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return read(reinterpret_cast<uint8_t *>(t), sizeof(*t));
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:41:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read(const Span<T> &data)
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:43:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return read(reinterpret_cast<uint8_t *>(data.data()),
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:48:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	const std::remove_reference_t<T> *read(size_t count = 1)
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:51:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return reinterpret_cast<return_type>(read(sizeof(T), count));
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:73:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int read(uint8_t *data, size_t size);
data/libcamera-0~git20200629+e7aa92a/include/libcamera/internal/byte_stream_buffer.h:74:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	const uint8_t *read(size_t size, size_t count);
data/libcamera-0~git20200629+e7aa92a/src/android/metadata/camera_metadata_tag_info.c:2805:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dst, msg, size - 1);
data/libcamera-0~git20200629+e7aa92a/src/cam/options.cpp:214:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			length += 1 + strlen(option.typeName());
data/libcamera-0~git20200629+e7aa92a/src/cam/options.cpp:471:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			length += 2 + strlen(option.name);
data/libcamera-0~git20200629+e7aa92a/src/cam/options.cpp:473:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			length += 1 + strlen(option.argumentName);
data/libcamera-0~git20200629+e7aa92a/src/ipa/raspberrypi/controller/controller.cpp:100:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t algo_name_len = strlen(algo_name);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/byte_stream_buffer.cpp:275:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
const uint8_t *ByteStreamBuffer::read(size_t size, size_t count)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/byte_stream_buffer.cpp:301:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int ByteStreamBuffer::read(uint8_t *data, size_t size)
data/libcamera-0~git20200629+e7aa92a/src/libcamera/control_serializer.cpp:306:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	buffer.read(value.data());
data/libcamera-0~git20200629+e7aa92a/src/libcamera/control_serializer.cpp:344:49:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	const struct ipa_controls_header *hdr = buffer.read<decltype(*hdr)>();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/control_serializer.cpp:369:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			entries.read<decltype(*entry)>();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/control_serializer.cpp:417:49:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	const struct ipa_controls_header *hdr = buffer.read<decltype(*hdr)>();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/control_serializer.cpp:466:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			entries.read<decltype(*entry)>();
data/libcamera-0~git20200629+e7aa92a/src/libcamera/device_enumerator_sysfs.cpp:139:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			deviceNode = "/dev/" + line.substr(strlen("DEVNAME="));
data/libcamera-0~git20200629+e7aa92a/src/libcamera/event_dispatcher_poll.cpp:234:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t ret = read(eventfd_, &value, sizeof(value));
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_manager.cpp:196:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int offset = strlen(ent->d_name) - 3;
data/libcamera-0~git20200629+e7aa92a/src/libcamera/ipa_module.cpp:161:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							  strlen(symbol) + 1);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/process.cpp:95:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t ret = read(pipe_[0], &data, sizeof(data));
data/libcamera-0~git20200629+e7aa92a/src/libcamera/utils.cpp:252:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dst, src, size);
data/libcamera-0~git20200629+e7aa92a/src/libcamera/utils.cpp:256:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return strlen(src);
data/libcamera-0~git20200629+e7aa92a/src/v4l2/v4l2_camera_proxy.cpp:641:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int ret = ::read(file->efd(), &data, sizeof(data));
data/libcamera-0~git20200629+e7aa92a/test/byte-stream-buffer.cpp:72:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = wbuf.read(&value);
data/libcamera-0~git20200629+e7aa92a/test/byte-stream-buffer.cpp:112:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = rbuf.read(&value);
data/libcamera-0~git20200629+e7aa92a/test/byte-stream-buffer.cpp:130:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = rco.read(&value);
data/libcamera-0~git20200629+e7aa92a/test/byte-stream-buffer.cpp:150:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ret = rco.read(&value);
data/libcamera-0~git20200629+e7aa92a/test/controls/control_value.cpp:62:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    !std::equal(bools.begin(), bools.end(), boolsResult.begin())) {
data/libcamera-0~git20200629+e7aa92a/test/controls/control_value.cpp:102:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    !std::equal(bytes.begin(), bytes.end(), int8sResult.begin())) {
data/libcamera-0~git20200629+e7aa92a/test/controls/control_value.cpp:142:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    !std::equal(int32s.begin(), int32s.end(), int32sResult.begin())) {
data/libcamera-0~git20200629+e7aa92a/test/controls/control_value.cpp:182:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    !std::equal(int64s.begin(), int64s.end(), int64sResult.begin())) {
data/libcamera-0~git20200629+e7aa92a/test/controls/control_value.cpp:222:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    !std::equal(floats.begin(), floats.end(), floatsResult.begin())) {
data/libcamera-0~git20200629+e7aa92a/test/event-thread.cpp:72:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		size_ = read(notifier->fd(), data_, sizeof(data_));
data/libcamera-0~git20200629+e7aa92a/test/event.cpp:28:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		size_ = read(notifier->fd(), data_, sizeof(data_));
data/libcamera-0~git20200629+e7aa92a/test/ipa/ipa_interface_test.cpp:156:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ssize_t s = read(notifier->fd(), &trace_, sizeof(trace_));
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:145:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					ssize_t num = read(fd, &buf, sizeof(buf));
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:314:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			unsigned int len = strlen(strings[i]);
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:336:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			unsigned int len = strlen(strings[i]);
data/libcamera-0~git20200629+e7aa92a/test/ipc/unixsocket.cpp:341:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(response.fds[0], &buf, len) <= 0)
data/libcamera-0~git20200629+e7aa92a/test/log/log_api.cpp:99:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, buf, sizeof(buf)) < 0) {
data/libcamera-0~git20200629+e7aa92a/test/log/log_process.cpp:40:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(50000);
data/libcamera-0~git20200629+e7aa92a/test/log/log_process.cpp:108:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, buf, sizeof(buf)) < 0) {
data/libcamera-0~git20200629+e7aa92a/test/process/process_test.cpp:29:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(50000);
data/libcamera-0~git20200629+e7aa92a/utils/ipu3/ipu3-unpack.c:54:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(in_fd, in_data, 32);

ANALYSIS SUMMARY:

Hits = 229
Lines analyzed = 77873 in approximately 2.02 seconds (38567 lines/second)
Physical Source Lines of Code (SLOC) = 44138
Hits@level = [0]  19 [1]  49 [2] 163 [3]   6 [4]  11 [5]   0
Hits@level+ = [0+] 248 [1+] 229 [2+] 180 [3+]  17 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 5.61874 [1+] 5.18827 [2+] 4.07812 [3+] 0.385156 [4+] 0.249218 [5+]   0
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.