New Defects reported by Coverity Scan for digiKam

scan-admin at coverity.com scan-admin at coverity.com
Thu Dec 5 07:08:21 GMT 2024


Hi,

Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.

4 new defect(s) introduced to digiKam found with Coverity Scan.
9 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1636568:  Error handling issues  (CHECKED_RETURN)
/mnt/data/Devel/8.x/core/dplugins/generic/tools/dngconverter/dngconvertertask.cpp: 103 in DigikamGenericDNGConverterPlugin::DNGConverterTask::run()()


________________________________________________________________________________________________________
*** CID 1636568:  Error handling issues  (CHECKED_RETURN)
/mnt/data/Devel/8.x/core/dplugins/generic/tools/dngconverter/dngconvertertask.cpp: 103 in DigikamGenericDNGConverterPlugin::DNGConverterTask::run()()
97         {
98             case IDENTIFY:
99             {
100                 // Identify Camera model.
101     
102                 DRawInfo info;
>>>     CID 1636568:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "rawFileIdentify" without checking return value (as is done elsewhere 6 out of 7 times).
103                 DRawDecoder::rawFileIdentify(info, d->url.toLocalFile());
104     
105                 QString identify = i18n("Cannot identify Raw image");
106     
107                 if (info.isDecodable)
108                 {

** CID 1620146:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/usr/include/c++/13/format: 1124 in std::__format::__formatter_int<wchar_t>::_S_to_character<int>(T1)()


________________________________________________________________________________________________________
*** CID 1620146:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/usr/include/c++/13/format: 1124 in std::__format::__formatter_int<wchar_t>::_S_to_character<int>(T1)()
1118     	    {
1119     	      if (_Traits::__min <= __i && __i <= _Traits::__max)
1120     		return static_cast<_CharT>(__i);
1121     	    }
1122     	  else if constexpr (is_signed_v<_Int>)
1123     	    {
>>>     CID 1620146:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>>     "(std::__format::__formatter_int<wchar_t>::make_unsigned_t<int>)__i <= 4294967295U /* __gnu_cxx::__numeric_traits_integer<wchar_t>::__max */" is always true regardless of the values of its operands. This occurs as the logical second operand of "&&".
1124     	      if (__i >= 0 && make_unsigned_t<_Int>(__i) <= _Traits::__max)
1125     		return static_cast<_CharT>(__i);
1126     	    }
1127     	  else if (__i <= make_unsigned_t<_CharT>(_Traits::__max))
1128     	    return static_cast<_CharT>(__i);
1129     	  __throw_format_error("format error: integer not representable as "

** CID 1619966:  Control flow issues  (DEADCODE)
/usr/include/c++/13/bit: 233 in std::__countl_zero<unsigned __int128>(T1)()


________________________________________________________________________________________________________
*** CID 1619966:  Control flow issues  (DEADCODE)
/usr/include/c++/13/bit: 233 in std::__countl_zero<unsigned __int128>(T1)()
227     	  unsigned long long __high = __x >> _Nd_ull;
228     	  if (__high != 0)
229     	    {
230     	      constexpr int __diff = (2 * _Nd_ull) - _Nd;
231     	      return __builtin_clzll(__high) - __diff;
232     	    }
>>>     CID 1619966:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "__max_ull = 184467440737095...".
233     	  constexpr auto __max_ull = __int_traits<unsigned long long>::__max;
234     	  unsigned long long __low = __x & __max_ull;
235     	  return (_Nd - _Nd_ull) + __builtin_clzll(__low);
236     	}
237         }
238     

** CID 1619751:    (UNINIT)
/usr/include/c++/13/format: 3312 in std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char>>::get(unsigned long) const()
/usr/include/c++/13/format: 3312 in std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<wchar_t>, wchar_t>>::get(unsigned long) const()


________________________________________________________________________________________________________
*** CID 1619751:    (UNINIT)
/usr/include/c++/13/format: 3312 in std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char>>::get(unsigned long) const()
3306     	  {
3307     	    __arg._M_type = _M_type(__i);
3308     	    __arg._M_val = _M_values[__i];
3309     	  }
3310     	else if (_M_packed_size == 0 && __i < _M_unpacked_size)
3311     	  __arg = _M_args[__i];
>>>     CID 1619751:    (UNINIT)
>>>     Using uninitialized value "__arg". Field "__arg._M_val" is uninitialized.
3312     	return __arg;
3313           }
3314         };
3315     
3316       // _GLIBCXX_RESOLVE_LIB_DEFECTS
3317       // 3810. CTAD for std::basic_format_args
/usr/include/c++/13/format: 3312 in std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<wchar_t>, wchar_t>>::get(unsigned long) const()
3306     	  {
3307     	    __arg._M_type = _M_type(__i);
3308     	    __arg._M_val = _M_values[__i];
3309     	  }
3310     	else if (_M_packed_size == 0 && __i < _M_unpacked_size)
3311     	  __arg = _M_args[__i];
>>>     CID 1619751:    (UNINIT)
>>>     Using uninitialized value "__arg". Field "__arg._M_val" is uninitialized.
3312     	return __arg;
3313           }
3314         };
3315     
3316       // _GLIBCXX_RESOLVE_LIB_DEFECTS
3317       // 3810. CTAD for std::basic_format_args


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4yJUfIaFVfulX1EnArvLvmGJ18AyhOhOJnWywYkUuR-2BHL458rbL5b5DiAzhSjilZ8-3Dm6kd_wUwU8mg96yc-2FA1IAMQ6mJ-2FFdQ9EM-2BFY-2BXFbSpXNYnfyP7kYouZ7Jq5BK5hYDnIeHkJyHoNoMTaRus99HudxOWLLxFKFUHzdsmljbvBCWIUJYgXGbz7xETRLACMPYxGci7g4kf21bvtEWMf2WlW4Et-2BZzRjJg4uW0mUs-2FzJojV-2BJI0UIY3yfwuSWom8XOUfIiU2zaUGOIKtFXbhD6WKaYsg-3D-3D



More information about the Digikam-devel mailing list