Error: CPPCHECK_WARNING (CWE-398): [#def1] exiv2-0.28.3-build/exiv2-0.28.3/src/preview.cpp:821: error[containerOutOfBounds]: Out of bounds access in 'decodeHexTable[static_cast<uint8_t>('0')+i]', if 'decodeHexTable' size is 2 and 'static_cast<uint8_t>('0')+i' is 57 # 819| auto decodeHexTable = std::vector<byte>(256, invalid); # 820| for (byte i = 0; i < 10; i++) # 821|-> decodeHexTable[static_cast<byte>('0') + i] = i; # 822| for (byte i = 0; i < 6; i++) # 823| decodeHexTable[static_cast<byte>('A') + i] = i + 10; Error: CPPCHECK_WARNING (CWE-398): [#def2] exiv2-0.28.3-build/exiv2-0.28.3/src/preview.cpp:823: error[containerOutOfBounds]: Out of bounds access in 'decodeHexTable[static_cast<uint8_t>('A')+i]', if 'decodeHexTable' size is 2 and 'static_cast<uint8_t>('A')+i' is 70 # 821| decodeHexTable[static_cast<byte>('0') + i] = i; # 822| for (byte i = 0; i < 6; i++) # 823|-> decodeHexTable[static_cast<byte>('A') + i] = i + 10; # 824| for (byte i = 0; i < 6; i++) # 825| decodeHexTable[static_cast<byte>('a') + i] = i + 10; Error: CPPCHECK_WARNING (CWE-398): [#def3] exiv2-0.28.3-build/exiv2-0.28.3/src/preview.cpp:825: error[containerOutOfBounds]: Out of bounds access in 'decodeHexTable[static_cast<uint8_t>('a')+i]', if 'decodeHexTable' size is 2 and 'static_cast<uint8_t>('a')+i' is 102 # 823| decodeHexTable[static_cast<byte>('A') + i] = i + 10; # 824| for (byte i = 0; i < 6; i++) # 825|-> decodeHexTable[static_cast<byte>('a') + i] = i + 10; # 826| # 827| // calculate dest size Error: CPPCHECK_WARNING (CWE-476): [#def4] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPIterator.cpp:148: warning[nullPointer]: Possible null pointer dereference: iter # 146| # 147| XMPIterator * iter = WtoXMPIterator_Ptr ( iterRef ); # 148|-> XMP_Bool found = iter->Next ( schemaNS, nsSize, propPath, pathSize, propValue, valueSize, propOptions ); # 149| wResult->int32Result = found; # 150| Error: CPPCHECK_WARNING (CWE-476): [#def5] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPIterator.cpp:164: warning[nullPointer]: Possible null pointer dereference: iter # 162| # 163| XMPIterator * iter = WtoXMPIterator_Ptr ( iterRef ); # 164|-> iter->Skip ( options ); # 165| # 166| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def6] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPIterator.cpp:179: warning[nullPointer]: Possible null pointer dereference: iter # 177| # 178| XMPIterator * iter = WtoXMPIterator_Ptr ( iterRef ); # 179|-> iter->UnlockIter ( options ); # 180| # 181| XMP_EXIT_WRAPPER_NO_THROW Error: CPPCHECK_WARNING (CWE-476): [#def7] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:529: warning[nullPointer]: Possible null pointer dereference: meta # 527| # 528| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 529|-> meta->SetProperty ( schemaNS, propName, propValue, options ); # 530| # 531| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def8] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:551: warning[nullPointer]: Possible null pointer dereference: meta # 549| # 550| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 551|-> meta->SetArrayItem ( schemaNS, arrayName, itemIndex, itemValue, options ); # 552| # 553| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def9] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:573: warning[nullPointer]: Possible null pointer dereference: meta # 571| # 572| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 573|-> meta->AppendArrayItem ( schemaNS, arrayName, arrayOptions, itemValue, options ); # 574| # 575| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def10] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:598: warning[nullPointer]: Possible null pointer dereference: meta # 596| # 597| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 598|-> meta->SetStructField ( schemaNS, structName, fieldNS, fieldName, fieldValue, options ); # 599| # 600| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def11] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:623: warning[nullPointer]: Possible null pointer dereference: meta # 621| # 622| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 623|-> meta->SetQualifier ( schemaNS, propName, qualNS, qualName, qualValue, options ); # 624| # 625| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def12] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:642: warning[nullPointer]: Possible null pointer dereference: meta # 640| # 641| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 642|-> meta->DeleteProperty ( schemaNS, propName ); # 643| # 644| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def13] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:662: warning[nullPointer]: Possible null pointer dereference: meta # 660| # 661| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 662|-> meta->DeleteArrayItem ( schemaNS, arrayName, itemIndex ); # 663| # 664| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def14] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:685: warning[nullPointer]: Possible null pointer dereference: meta # 683| # 684| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 685|-> meta->DeleteStructField ( schemaNS, structName, fieldNS, fieldName ); # 686| # 687| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def15] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:708: warning[nullPointer]: Possible null pointer dereference: meta # 706| # 707| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 708|-> meta->DeleteQualifier ( schemaNS, propName, qualNS, qualName ); # 709| # 710| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def16] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:859: warning[nullPointer]: Possible null pointer dereference: meta # 857| # 858| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 859|-> meta->SetLocalizedText ( schemaNS, arrayName, genericLang, specificLang, itemValue, options ); # 860| # 861| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def17] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1007: warning[nullPointer]: Possible null pointer dereference: meta # 1005| # 1006| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1007|-> meta->SetProperty_Bool ( schemaNS, propName, propValue, options ); # 1008| # 1009| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def18] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1028: warning[nullPointer]: Possible null pointer dereference: meta # 1026| # 1027| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1028|-> meta->SetProperty_Int ( schemaNS, propName, propValue, options ); # 1029| # 1030| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def19] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1049: warning[nullPointer]: Possible null pointer dereference: meta # 1047| # 1048| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1049|-> meta->SetProperty_Int64 ( schemaNS, propName, propValue, options ); # 1050| # 1051| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def20] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1070: warning[nullPointer]: Possible null pointer dereference: meta # 1068| # 1069| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1070|-> meta->SetProperty_Float ( schemaNS, propName, propValue, options ); # 1071| # 1072| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def21] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1091: warning[nullPointer]: Possible null pointer dereference: meta # 1089| # 1090| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1091|-> meta->SetProperty_Date ( schemaNS, propName, propValue, options ); # 1092| # 1093| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def22] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1124: warning[nullPointer]: Possible null pointer dereference: meta # 1122| # 1123| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1124|-> meta->Sort(); # 1125| # 1126| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def23] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1138: warning[nullPointer]: Possible null pointer dereference: meta # 1136| # 1137| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1138|-> meta->Erase(); # 1139| # 1140| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def24] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1227: warning[nullPointer]: Possible null pointer dereference: meta # 1225| # 1226| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1227|-> meta->SetObjectName ( name ); # 1228| # 1229| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def25] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1257: warning[nullPointer]: Possible null pointer dereference: meta # 1255| # 1256| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1257|-> meta->SetObjectOptions ( options ); # 1258| # 1259| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-476): [#def26] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/WXMPMeta.cpp:1274: warning[nullPointer]: Possible null pointer dereference: meta # 1272| # 1273| XMPMeta * meta = WtoXMPMeta_Ptr ( xmpRef ); # 1274|-> meta->ParseFromBuffer ( buffer, bufferSize, options ); # 1275| # 1276| XMP_EXIT_WRAPPER Error: CPPCHECK_WARNING (CWE-398): [#def27] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPCore_Impl.hpp:223: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions. # 221| public: # 222| XMP_AutoMutex() : mutex(&sXMPCoreLock) { XMP_EnterCriticalRegion ( *mutex ); ReportLock(); }; # 223|-> ~XMP_AutoMutex() { if ( mutex != 0 ) { ReportUnlock(); XMP_ExitCriticalRegion ( *mutex ); mutex = 0; } }; # 224| void KeepLock() { ReportKeepLock(); mutex = 0; }; # 225| private: Error: COMPILER_WARNING: [#def28] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPMeta.cpp: scope_hint: In function ‘XMP_Status DumpNodeOptions(XMP_OptionBits, XMP_TextOutputProc, void*)’ exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPMeta.cpp:90:70: warning[-Wformat=]: format ‘%lX’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘XMP_OptionBits’ {aka ‘unsigned int’} # 90 | #define OutProcHexInt(num) { snprintf ( buffer, sizeof(buffer), "%lX", (num) ); /* AUDIT: Using sizeof for snprintf length is safe */ \ # | ^~~~~ ~~~~~ exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPMeta.cpp:241:17: note: in expansion of macro ‘OutProcHexInt’ # 241 | OutProcHexInt ( options ); # | ^~~~~~~~~~~~~ exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPMeta.cpp:90:73: note: format string is defined here # 90 | #define OutProcHexInt(num) { snprintf ( buffer, sizeof(buffer), "%lX", (num) ); /* AUDIT: Using sizeof for snprintf length is safe */ \ # | ~~^ # | | # | long unsigned int # | %X # 88| status = (*outProc) ( refCon, buffer, strlen(buffer) ); if ( status != 0 ) goto EXIT; } # 89| #else # 90|-> #define OutProcHexInt(num) { snprintf ( buffer, sizeof(buffer), "%lX", (num) ); /* AUDIT: Using sizeof for snprintf length is safe */ \ # 91| status = (*outProc) ( refCon, buffer, strlen(buffer) ); if ( status != 0 ) goto EXIT; } # 92| #endif Error: COMPILER_WARNING: [#def29] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPUtils.cpp: scope_hint: In static member function ‘static XMP_Int64 XMPUtils::ConvertToInt64(XMP_StringPtr)’ exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPUtils.cpp:1221:48: warning[-Wformat=]: format ‘%lld’ expects argument of type ‘long long int*’, but argument 3 has type ‘XMP_Int64*’ {aka ‘long int*’} # 1221 | count = sscanf ( strValue, "%lld%c", &result, &nextCh ); # | ~~~^ ~~~~~~~ # | | | # | | XMP_Int64* {aka long int*} # | long long int* # | %ld # 1219| # 1220| if ( ! XMP_LitNMatch ( strValue, "0x", 2 ) ) { # 1221|-> count = sscanf ( strValue, "%lld%c", &result, &nextCh ); # 1222| } else { # 1223| count = sscanf ( strValue, "%llx%c", &result, &nextCh ); Error: COMPILER_WARNING: [#def30] exiv2-0.28.3-build/exiv2-0.28.3/xmpsdk/src/XMPUtils.cpp:1223:48: warning[-Wformat=]: format ‘%llx’ expects argument of type ‘long long unsigned int*’, but argument 3 has type ‘XMP_Int64*’ {aka ‘long int*’} # 1223 | count = sscanf ( strValue, "%llx%c", &result, &nextCh ); # | ~~~^ ~~~~~~~ # | | | # | | XMP_Int64* {aka long int*} # | long long unsigned int* # | %lx # 1221| count = sscanf ( strValue, "%lld%c", &result, &nextCh ); # 1222| } else { # 1223|-> count = sscanf ( strValue, "%llx%c", &result, &nextCh ); # 1224| } # 1225|
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-140.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | exiv2-0.28.3-1.fc42 |
store-results-to | /tmp/tmpipopa4nx/exiv2-0.28.3-1.fc42.tar.xz |
time-created | 2024-11-12 23:47:15 |
time-finished | 2024-11-12 23:50:23 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpipopa4nx/exiv2-0.28.3-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpipopa4nx/exiv2-0.28.3-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |