)]}'
{
  "commit": "f131f10b63fac3bfa8f96c67a446c36bfcccbe6a",
  "tree": "2e079e18d5abf65b4555c65c1b02c427098e8b99",
  "parents": [
    "2a21cbee47a124edf43fc9ee156d7093e2f957fd"
  ],
  "author": {
    "name": "Daniel Henrique Barboza",
    "email": "dbarboza@ventanamicro.com",
    "time": "Wed Oct 22 09:56:43 2025 -0300"
  },
  "committer": {
    "name": "Alistair Francis",
    "email": "alistair.francis@wdc.com",
    "time": "Fri Oct 24 09:24:08 2025 +1000"
  },
  "message": "target/riscv/riscv-qmp-cmds.c: coverity-related fixes\n\nCoverity CID 1641401 reports that, in reg_is_ulong_integer(), we\u0027re\ndereferencing a NULL pointer in \"reg1\" when using it in strcasecmp()\ncall. A similar case is reported with CID 1641393.\n\nIn theory that will never happen - it\u0027s guaranteed that both \"reg1\" and\n\"reg2\" is non-NULL because we\u0027re retrieving them in compile-time from\nstatic arrays. Coverity doesn\u0027t know that though.\n\nTo make Coverity happier and add a bit more clarity in the code,\ng_assert() each token to make it clear that those 2 values aren\u0027t\nsupposed to be NULL ever. Do that in both reg_is_ulong_integer() and\nreg_is_u64_fpu().\n\nWe\u0027re also taking the opportunity to implement suggestions made by Peter\nin [1] in both functions:\n\n- use g_strsplit() instead of strtok();\n- use g_ascii_strcasecmp() instead of strcasecmp().\n\n[1] https://lore.kernel.org/qemu-devel/CAFEAcA_y4bwd9GANbXnpTy2mv80Vg_jp+A-VkQS5V6f0+BFRAA@mail.gmail.com/\n\nCoverity: CID 1641393, 1641401\nFixes: e06d209aa6 (\"target/riscv: implement MonitorDef HMP API\")\nSuggested-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\nSigned-off-by: Daniel Henrique Barboza \u003cdbarboza@ventanamicro.com\u003e\nReviewed-by: Alistair Francis \u003calistair.francis@wdc.com\u003e\nMessage-ID: \u003c20251022125643.588947-1-dbarboza@ventanamicro.com\u003e\nSigned-off-by: Alistair Francis \u003calistair.francis@wdc.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c499f9b9a7d6b99d4e9536af67b80b26ec83b3c9",
      "old_mode": 33188,
      "old_path": "target/riscv/riscv-qmp-cmds.c",
      "new_id": "d5e9bec0f86ffb31ac3e43f574985cb59a8dddc3",
      "new_mode": 33188,
      "new_path": "target/riscv/riscv-qmp-cmds.c"
    }
  ]
}
