common_api.nativecodeanalysis.sarif 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. {
  2. "version": "2.1.0",
  3. "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
  4. "runs": [
  5. {
  6. "results": [
  7. {
  8. "ruleId": "C26451",
  9. "message": {
  10. "text": "算术溢出: 使用 4 字节值上的运算符 * ,然后将结果转换到 8 字节值。在调用运算符 * 之前将值强制转换为宽类型可避免溢出(io.2)。"
  11. },
  12. "locations": [
  13. {
  14. "physicalLocation": {
  15. "artifactLocation": {
  16. "uri": "file:///E:/Deliver/include/common_api.cpp"
  17. },
  18. "region": {
  19. "startLine": 191,
  20. "startColumn": 14,
  21. "endLine": 191,
  22. "endColumn": 23
  23. }
  24. },
  25. "logicalLocations": [
  26. {
  27. "decoratedName": "?RawToHex@@YAXPEBDKAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z",
  28. "kind": "function"
  29. }
  30. ]
  31. }
  32. ]
  33. },
  34. {
  35. "ruleId": "C26451",
  36. "message": {
  37. "text": "算术溢出: 使用 4 字节值上的运算符 + ,然后将结果转换到 8 字节值。在调用运算符 + 之前将值强制转换为宽类型可避免溢出(io.2)。"
  38. },
  39. "locations": [
  40. {
  41. "physicalLocation": {
  42. "artifactLocation": {
  43. "uri": "file:///E:/Deliver/include/common_api.cpp"
  44. },
  45. "region": {
  46. "startLine": 345,
  47. "startColumn": 21,
  48. "endLine": 345,
  49. "endColumn": 47
  50. }
  51. },
  52. "logicalLocations": [
  53. {
  54. "decoratedName": "?FormatstdString@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBDZZ",
  55. "kind": "function"
  56. }
  57. ]
  58. }
  59. ]
  60. }
  61. ],
  62. "tool": {
  63. "driver": {
  64. "name": "PREfast",
  65. "fullName": "PREfast Code Analysis",
  66. "version": "14.29.30147.0",
  67. "informationUri": "https://aka.ms/cpp/ca"
  68. }
  69. },
  70. "invocations": [
  71. {
  72. "commandLine": "\"d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\c1xx.dll\" -ACf{1F7B090C-16DB-4822-966A-A93D26ED4681} -ACpmspft140.dll -Alint -D_PREFAST_ -D_AST_FE_ -Analyze -zm0x00B2C1B0 -allChunksReserved -il C:\\Users\\ecom\\AppData\\Local\\Temp\\_CL_5d0bddbeast -typedil -f ..\\..\\..\\..\\Deliver\\include\\common_api.cpp -Ze -D_MSC_EXTENSIONS -Zp16 -pc \\:/ -D_MSC_VER=1929 -D_MSC_FULL_VER=192930147 -D_MSC_BUILD=0 -D_M_AMD64=100 -ZILP448 -D_M_X64=100 -D_WIN64 -D_WIN32 -GR -D_CPPRTTI -nologo -W 3 -diagnostics:column -D_GUARDOVERFLOW_CRT_ALLOCATORS=1 -GF -Og -Ot -Oy -Oi -ltcg -DCODE_ANALYSIS -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DNEWMODELDPC_EXPORTS -D_WINDLL -D_MBCS -EHs -D_CPPUNWIND -EHc -MD -D_MT -D_DLL -GS -D_M_FP_PRECISE -Zc:wchar_t -Zc:forScope -std:c++17 -Yustdafx.h -Fpx64\\Release\\NewModelDPCX64.pch -Fox64\\Release\\common_api.obj -Fdx64\\Release\\vc142.pdb -external:W 3 -Gd -analyze:projectdirectory E:\\CCOS_V2\\DriverPlatform\\OemLayer\\NewModelDPC -analyze:rulesetdirectory ;d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\\\Rule Sets; -analyze:ruleset d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\Rule Sets\\NativeRecommendedRules.ruleset -analyze:quiet -analyze:plugin d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\EspXEngine.dll -FC -errorreport:prompt -I E:\\deliver\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt -external:I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um",
  73. "executionSuccessful": true
  74. }
  75. ],
  76. "artifacts": [
  77. {
  78. "location": {
  79. "uri": "file:///E:/CCOS_V2/DriverPlatform/OemLayer/NewModelDPC/NewModelDPC.cpp"
  80. },
  81. "roles": [
  82. "analysisTarget",
  83. "resultFile"
  84. ],
  85. "hashes": {
  86. "md5": "99207def58ee259e5c18c07432b0abab"
  87. }
  88. },
  89. {
  90. "location": {
  91. "uri": "file:///E:/deliver/include/ResDataObject.h"
  92. },
  93. "roles": [
  94. "resultFile"
  95. ],
  96. "hashes": {
  97. "md5": "5952703846c703003535fa667ae9a289"
  98. }
  99. },
  100. {
  101. "location": {
  102. "uri": "file:///e:/ccos_v2/driverplatform/oemlayer/newmodeldpc/stdafx.h"
  103. },
  104. "hashes": {
  105. "md5": "1670d257289af5a4bf0cc9741805575e"
  106. }
  107. },
  108. {
  109. "location": {
  110. "uri": "file:///e:/ccos_v2/driverplatform/oemlayer/newmodeldpc/targetver.h"
  111. },
  112. "hashes": {
  113. "md5": "20a1397a4f718d91f76e2681bef085b6"
  114. }
  115. },
  116. {
  117. "location": {
  118. "uri": "file:///e:/ccos_v2/driverplatform/oemlayer/newmodeldpc/newmodeldpc.h"
  119. },
  120. "hashes": {
  121. "md5": "78934c03ac18072263962879dda2058c"
  122. }
  123. },
  124. {
  125. "location": {
  126. "uri": "file:///e:/deliver/include/logicdriver.h"
  127. },
  128. "hashes": {
  129. "md5": "1f6fc16ba6c0414d0f15c0c0ffc9f2f9"
  130. }
  131. },
  132. {
  133. "location": {
  134. "uri": "file:///e:/deliver/include/dpc.h"
  135. },
  136. "hashes": {
  137. "md5": "f041f405e6f932a8c1cf3520a56fede0"
  138. }
  139. },
  140. {
  141. "location": {
  142. "uri": "file:///e:/deliver/include/logger.h"
  143. },
  144. "hashes": {
  145. "md5": "dcc81685c0ed303899127b874b73f16e"
  146. }
  147. },
  148. {
  149. "location": {
  150. "uri": "file:///e:/deliver/include/ccoslock.h"
  151. },
  152. "hashes": {
  153. "md5": "19f422bc4ce2ba8a2fd99f23bd1218fc"
  154. }
  155. },
  156. {
  157. "location": {
  158. "uri": "file:///e:/deliver/include/definitions.h"
  159. },
  160. "hashes": {
  161. "md5": "07878c897e77929c249016920da5e648"
  162. }
  163. },
  164. {
  165. "location": {
  166. "uri": "file:///e:/deliver/include/logicdevice.h"
  167. },
  168. "hashes": {
  169. "md5": "4412949d99d7097322c97f1ebf6fde34"
  170. }
  171. },
  172. {
  173. "location": {
  174. "uri": "file:///e:/deliver/include/ccos.dev.iodevice.hpp"
  175. },
  176. "hashes": {
  177. "md5": "fa955ae17f2194377b00b4cda5acb943"
  178. }
  179. },
  180. {
  181. "location": {
  182. "uri": "file:///e:/deliver/include/tmplevent.tlh"
  183. },
  184. "hashes": {
  185. "md5": "1a8b4eea25218adb7bde2cd6c9fe38cc"
  186. }
  187. },
  188. {
  189. "location": {
  190. "uri": "file:///e:/deliver/include/devtree.h"
  191. },
  192. "hashes": {
  193. "md5": "38830f1e922fdb920d97388da81db039"
  194. }
  195. },
  196. {
  197. "location": {
  198. "uri": "file:///e:/ccos_v2/driverplatform/oemlayer/newmodeldpc/newmodeldevice.h"
  199. },
  200. "hashes": {
  201. "md5": "a3796acb30f7f203025c3b39824e8c1f"
  202. }
  203. },
  204. {
  205. "location": {
  206. "uri": "file:///e:/deliver/include/common_api.h"
  207. },
  208. "hashes": {
  209. "md5": "b3fe9e47713eb74ad1294f29077c8a8a"
  210. }
  211. },
  212. {
  213. "location": {
  214. "uri": "file:///E:/CCOS_V2/DriverPlatform/OemLayer/NewModelDPC/NewModelDevice.cpp"
  215. },
  216. "roles": [
  217. "analysisTarget",
  218. "resultFile"
  219. ],
  220. "hashes": {
  221. "md5": "1ebaefbd267083f1c0ae152cf0fb94bb"
  222. }
  223. },
  224. {
  225. "location": {
  226. "uri": "file:///e:/deliver/include/packetanalizer.h"
  227. },
  228. "hashes": {
  229. "md5": "7fa7a13e7c88c4eb71b8926741a67149"
  230. }
  231. },
  232. {
  233. "location": {
  234. "uri": "file:///e:/deliver/include/ccosfilehandle.h"
  235. },
  236. "hashes": {
  237. "md5": "d7b028d6b156db169d9b66dfa079c3e2"
  238. }
  239. },
  240. {
  241. "location": {
  242. "uri": "file:///e:/ccos_v2/driverplatform/oemlayer/newmodeldpc/imagepool.h"
  243. },
  244. "hashes": {
  245. "md5": "00fcacc73eb95256b4668ce6192277f1"
  246. }
  247. },
  248. {
  249. "location": {
  250. "uri": "file:///e:/deliver/include/sharememory_circle.h"
  251. },
  252. "hashes": {
  253. "md5": "b6ab46e25158a566b98b594c769d99da"
  254. }
  255. },
  256. {
  257. "location": {
  258. "uri": "file:///e:/deliver/include/sharememory_client.h"
  259. },
  260. "hashes": {
  261. "md5": "57e378a6d9167f73356b18ae10b69de3"
  262. }
  263. },
  264. {
  265. "location": {
  266. "uri": "file:///E:/CCOS_V2/DriverPlatform/OemLayer/NewModelDPC/ImagePool.cpp"
  267. },
  268. "roles": [
  269. "analysisTarget",
  270. "resultFile"
  271. ],
  272. "hashes": {
  273. "md5": "e094aec9a340470b11b285db037e7d47"
  274. }
  275. },
  276. {
  277. "location": {
  278. "uri": "file:///E:/Deliver/include/PacketAnalizer.cpp"
  279. },
  280. "roles": [
  281. "analysisTarget",
  282. "resultFile"
  283. ],
  284. "hashes": {
  285. "md5": "c4f7d2ddab0418d0522860c3119dffaf"
  286. }
  287. },
  288. {
  289. "location": {
  290. "uri": "file:///e:/deliver/include/crc64.h"
  291. },
  292. "hashes": {
  293. "md5": "f37a9f0a9928ecf57a90d3607517598b"
  294. }
  295. },
  296. {
  297. "location": {
  298. "uri": "file:///E:/Deliver/include/common_api.cpp"
  299. },
  300. "roles": [
  301. "analysisTarget",
  302. "resultFile"
  303. ],
  304. "hashes": {
  305. "md5": "a4db3f6ec1519af62811e9caa4dce3b6"
  306. }
  307. }
  308. ]
  309. }
  310. ]
  311. }