)]}'
{
  "commit": "e6e51ccbf17ff40a899c8859fb4e95abd5cfcd57",
  "tree": "7ebfff0ca8e1f69fb9397e49d7e5d889a42c9b25",
  "parents": [
    "6215a886d2b8090986beaab2d96bd5ad0bf1d1a8"
  ],
  "author": {
    "name": "Michael Brown",
    "email": "mcb30@ipxe.org",
    "time": "Fri Aug 07 15:48:14 2026 +0100"
  },
  "committer": {
    "name": "Michael Brown",
    "email": "mcb30@ipxe.org",
    "time": "Fri Aug 07 15:58:21 2026 +0100"
  },
  "message": "[build] Move various pointer assignments after their length checks\n\nWhen performing a length check on untrusted received data, it is\npreferable to assign the corresponding typed pointer only after\nvalidating that the length is sufficient to contain the dereferenced\npointer type.  This allows the compiler to catch any unintended\ndereferences before the length check has taken place, and so hardens\nthe code against future potential changes.\n\nThis pattern of assigning the pointer only after the corresponding\nlength check is already fairly widespread, but there are still large\nswathes of older code that use the less safe idiom of assigning the\npointer first (generally as part of the variable declaration).\n\nMove an assortment of pointer assignments after their corresponding\nlength checks, and fix the few harmless premature dereferences that\nwere discovered in the process (e.g. using a potentially non-existent\nIPv4 source address as a debug colour stream identifier).\n\nThis is not intended to be a comprehensive update of all such pointer\nassignments, merely an improvement of those sites where assignments\nare easily identifiable and trivially hardened.\n\nSigned-off-by: Michael Brown \u003cmcb30@ipxe.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f0ef574746e5bf5022c84a2e9c09c315b77e0bf0",
      "old_mode": 33188,
      "old_path": "src/drivers/block/srp.c",
      "new_id": "f552ac8cfc6736ddf9259d163f2c63a954c99452",
      "new_mode": 33188,
      "new_path": "src/drivers/block/srp.c"
    },
    {
      "type": "modify",
      "old_id": "d35737c4925774c00c2836eedf20723b95cb6003",
      "old_mode": 33188,
      "old_path": "src/drivers/net/iphone.c",
      "new_id": "661922c15474583bb3f299c40b2420522fda788a",
      "new_mode": 33188,
      "new_path": "src/drivers/net/iphone.c"
    },
    {
      "type": "modify",
      "old_id": "681aa54e71f71b98ff134a75547c8198e788bdf5",
      "old_mode": 33188,
      "old_path": "src/drivers/net/netvsc.c",
      "new_id": "8726eec94b8dc5c36e418091aa5706d62f61869c",
      "new_mode": 33188,
      "new_path": "src/drivers/net/netvsc.c"
    },
    {
      "type": "modify",
      "old_id": "edeb818673c267c49c080427b272bfaa210c940c",
      "old_mode": 33188,
      "old_path": "src/net/aoe.c",
      "new_id": "86911ab67cd84b4f6f0c39009a09f7d22c744d6e",
      "new_mode": 33188,
      "new_path": "src/net/aoe.c"
    },
    {
      "type": "modify",
      "old_id": "2bf3c12ecae0827cd6d673cc10bfe7f60a6c107e",
      "old_mode": 33188,
      "old_path": "src/net/arp.c",
      "new_id": "243f86217243f0f413dd9ecb686911c687288245",
      "new_mode": 33188,
      "new_path": "src/net/arp.c"
    },
    {
      "type": "modify",
      "old_id": "e4c78acd1886f09843328c88687a7d22106a7c2d",
      "old_mode": 33188,
      "old_path": "src/net/eth_slow.c",
      "new_id": "21d6219930ded0ca34881aea930f1c14d55dcf9f",
      "new_mode": 33188,
      "new_path": "src/net/eth_slow.c"
    },
    {
      "type": "modify",
      "old_id": "60219b98f0350721ca908dae6b37d25927124189",
      "old_mode": 33188,
      "old_path": "src/net/ethernet.c",
      "new_id": "069adb3fee7a9c08759ddd73a782cf8fdff9a8cf",
      "new_mode": 33188,
      "new_path": "src/net/ethernet.c"
    },
    {
      "type": "modify",
      "old_id": "2e8070272431575fc1a297efaafd0effc6cac729",
      "old_mode": 33188,
      "old_path": "src/net/fc.c",
      "new_id": "a6c7fd14cc3442b9c8633104097a54630b2c5ea2",
      "new_mode": 33188,
      "new_path": "src/net/fc.c"
    },
    {
      "type": "modify",
      "old_id": "5fc27cef457e732f4eee6c830ef3713bdb8b5a60",
      "old_mode": 33188,
      "old_path": "src/net/fcels.c",
      "new_id": "d97d2560d29dc481bdfabb0bbb17618c4c95e0de",
      "new_mode": 33188,
      "new_path": "src/net/fcels.c"
    },
    {
      "type": "modify",
      "old_id": "be4dfea246167ee2a2bc60267270eb1068ed7f34",
      "old_mode": 33188,
      "old_path": "src/net/fcns.c",
      "new_id": "2b966d528eb9b5378fb2e84b764d44c9c7f9e3c6",
      "new_mode": 33188,
      "new_path": "src/net/fcns.c"
    },
    {
      "type": "modify",
      "old_id": "5bb6ebff27d25ea06919ce5ec1e1780b13c01652",
      "old_mode": 33188,
      "old_path": "src/net/fcp.c",
      "new_id": "3332720285db4bb90071fca87e1d809ad3f209e2",
      "new_mode": 33188,
      "new_path": "src/net/fcp.c"
    },
    {
      "type": "modify",
      "old_id": "740b42440488a0276712ed875993207115e795d6",
      "old_mode": 33188,
      "old_path": "src/net/icmp.c",
      "new_id": "19d282ecd853b1da7d4441478c7a9036623fc4b2",
      "new_mode": 33188,
      "new_path": "src/net/icmp.c"
    },
    {
      "type": "modify",
      "old_id": "ffcc4b375bd545e23c962c713d4fb2b1463edd32",
      "old_mode": 33188,
      "old_path": "src/net/icmpv4.c",
      "new_id": "96980289c79cf9108dfc3929852f3b516eee889e",
      "new_mode": 33188,
      "new_path": "src/net/icmpv4.c"
    },
    {
      "type": "modify",
      "old_id": "5331b81e8097ca309900936af70104939fed581e",
      "old_mode": 33188,
      "old_path": "src/net/icmpv6.c",
      "new_id": "20bf5ff933ba37ca3293aee84888bea5a6d4a97d",
      "new_mode": 33188,
      "new_path": "src/net/icmpv6.c"
    },
    {
      "type": "modify",
      "old_id": "bda8bae05b4076111495d14d52800274bb527b0e",
      "old_mode": 33188,
      "old_path": "src/net/ipv4.c",
      "new_id": "75ea0087cb4db98224af383dac534c6aa99135c8",
      "new_mode": 33188,
      "new_path": "src/net/ipv4.c"
    },
    {
      "type": "modify",
      "old_id": "6d769585366f6a050e727c7aa8295a02e28932c1",
      "old_mode": 33188,
      "old_path": "src/net/ipv6.c",
      "new_id": "7a96cbb55ee49f4d670fc482543fcf53cbac69e3",
      "new_mode": 33188,
      "new_path": "src/net/ipv6.c"
    },
    {
      "type": "modify",
      "old_id": "5782813e1f5936db215e8862b64b4860ac1410f7",
      "old_mode": 33188,
      "old_path": "src/net/ping.c",
      "new_id": "7d7c874364294d42d5a5368e98d6a570caead322",
      "new_mode": 33188,
      "new_path": "src/net/ping.c"
    },
    {
      "type": "modify",
      "old_id": "f08db5250682d38a8881aa8cfcae5f7dc8903300",
      "old_mode": 33188,
      "old_path": "src/net/tcp.c",
      "new_id": "85e1ceb57204e96db28beafb055c5618b9e9840f",
      "new_mode": 33188,
      "new_path": "src/net/tcp.c"
    },
    {
      "type": "modify",
      "old_id": "41aba2fca78021f9bbeb05686043ae2294a33a38",
      "old_mode": 33188,
      "old_path": "src/net/udp.c",
      "new_id": "1619381799013892f5282d335f12bb2060cc72fa",
      "new_mode": 33188,
      "new_path": "src/net/udp.c"
    },
    {
      "type": "modify",
      "old_id": "43a569d6e81af8083f0ff5d225abcd4dcd984d38",
      "old_mode": 33188,
      "old_path": "src/net/udp/dhcpv6.c",
      "new_id": "8e007240dcc57191b41586d6d27d40c98a1011e4",
      "new_mode": 33188,
      "new_path": "src/net/udp/dhcpv6.c"
    },
    {
      "type": "modify",
      "old_id": "3f53675f9e7b18ef6bc7b0862b2baacd7c8e0368",
      "old_mode": 33188,
      "old_path": "src/net/udp/dns.c",
      "new_id": "5891611140ad076dd37c732c3bccab9335e80d92",
      "new_mode": 33188,
      "new_path": "src/net/udp/dns.c"
    },
    {
      "type": "modify",
      "old_id": "d25c0653b8969240ef4a0a5ab845414a8c1ca9c7",
      "old_mode": 33188,
      "old_path": "src/net/udp/tftp.c",
      "new_id": "7cc720fe559ac5af9c565316bbcf21d3917ad030",
      "new_mode": 33188,
      "new_path": "src/net/udp/tftp.c"
    },
    {
      "type": "modify",
      "old_id": "f7697a9be03d228b6da1b5c06eeeaf5d7ffa4971",
      "old_mode": 33188,
      "old_path": "src/net/vlan.c",
      "new_id": "47e869bea596461c90947cc42ca4bc355e5a187d",
      "new_mode": 33188,
      "new_path": "src/net/vlan.c"
    }
  ]
}
