)]}'
{
  "commit": "6410840fb40a141780d464294053fab8a115952b",
  "tree": "5c2846ccea19d37a6dbf2d0382bd9f1bce5c25d6",
  "parents": [
    "375786fc0e8ce34d72bafffb03a28689df94fb62"
  ],
  "author": {
    "name": "Andrew Jeffery",
    "email": "andrew@codeconstruct.com.au",
    "time": "Mon Jun 02 13:14:39 2025 +0930"
  },
  "committer": {
    "name": "Andrew Jeffery",
    "email": "andrew@codeconstruct.com.au",
    "time": "Mon Jun 02 13:26:00 2025 +0930"
  },
  "message": "console-server: Fix pointer arithmetic in container_of() implementation\n\nPointer arithmetic is performed in units of the size of the pointed-to\nobject. Cast to char to ensure that both the pointer arithmetic is\ndefined, and that subtracting the result of the offsetof() stays\nin-bounds.\n\nThe issue was detected by clang-tidy:\n\n```\n\u003e\u003e\u003e /usr/bin/clang-tidy --use-color -export-fixes .../obmc-console/buildc92dibdo/meson-private/clang-tidy-fix/log-handler.c.m2f5figo.yaml -quiet -p .../obmc-console/buildc92dibdo .../obmc-console/log-handler.c\n9557 warnings generated.\n../log-handler.c:50:9: error: suspicious usage of \u0027offsetof(...)\u0027 in pointer arithmetic; this scaled value will be scaled again by the \u0027-\u0027 operator [bugprone-sizeof-expression,-warnings-as-errors]\n   50 |         return container_of(handler, struct log_handler, handler);\n      |                ^\n../console-server.h:272:27: note: expanded from macro \u0027container_of\u0027\n  272 |         ((type *)((void *)((ptr) - offsetof(type, member))))\n      |                                  ^ ~~~~~~~~~~~~~~~~~~~~~~\n../log-handler.c:50:9: note: \u0027-\u0027 in pointer arithmetic internally scales with \u0027sizeof(struct handler)\u0027 \u003d\u003d 8\n   50 |         return container_of(handler, struct log_handler, handler);\n      |                ^\n../console-server.h:272:27: note: expanded from macro \u0027container_of\u0027\n  272 |         ((type *)((void *)((ptr) - offsetof(type, member))))\n      |                                  ^\n```\n\nChange-Id: I808428c0a751abeb4409cf28dd5e95588ae5c0e2\nFixes: 1a0e03b4385e (\"Split IO handling code into separate handler modules\")\nSigned-off-by: Andrew Jeffery \u003candrew@codeconstruct.com.au\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e86a3c4e13ab353f93ecb25c3cef6fba8e7a1b4c",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "626cc38a10f4b7b0fc2ee32e40fcb05a9348a01b",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "4360513ba9876c8c21ac87fa644549aa6bf2e717",
      "old_mode": 33188,
      "old_path": "console-server.h",
      "new_id": "7c45f185fa322022155c63e27788073e22130a14",
      "new_mode": 33188,
      "new_path": "console-server.h"
    }
  ]
}
