)]}'
{
  "commit": "4c005e3f65a1f5b4592b1ebbac392cbb1a710998",
  "tree": "ec2feadf6fe20841a179d31714a053863919ae1e",
  "parents": [
    "3ef0b877f08344aa52367794aa4ec32b12becd6d"
  ],
  "author": {
    "name": "John Glotzer",
    "email": "glotzer@amazon.com",
    "time": "Mon Aug 04 19:39:23 2014 +0000"
  },
  "committer": {
    "name": "David Lamparter",
    "email": "equinox@opensourcerouting.org",
    "time": "Mon Aug 18 01:52:26 2014 +0200"
  },
  "message": "bgpd: memmove needed in community_del_val\n\nIn bgpd/bgp_community_del_val memcpy is used for potentially overlapping\nregions which is *not* safe. It may \"work\" in some cases but is not\nguaranteed to work in all cases. The case that I saw fail was on an\nx86_64 architecture with the number of bytes being moved/copied equal to\n8.\n\nThe way the code is written the uint32_t pointers will always differ by\n1, which is equivalent to a memcpy/memmove of regions that are 4 bytes\naway from one another. So the code failed while copying an 8 byte region\nto an address that is 4 bytes lower i.e. overlapping regions.\n\nInterestingly, the same architecture had no problems with a 12 byte\ncopy.\n\nWhen the code failed the communities were [200,300,400] and a call was\nmade to delete the 200 community. The result of this was an array that\nlooked like [400,400] which was uniquified to [400]. Of course the\nexpected result should have been [300, 400].\n\nOne additional point - in our production environment memmove would not\n*link* without including \u003cstring.h\u003e but in an isolated quagga git repo\nthis #include does not seem to be required and I see memmove is used in\nvtysh.c without this #include either.\n\nSigned-off-by: David Lamparter \u003cequinox@opensourcerouting.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fc1bef88b7bf63b2dc6196249d0a06fc4b868f19",
      "old_mode": 33188,
      "old_path": "bgpd/bgp_community.c",
      "new_id": "1bd2dd84e44b292e2257ef512ca444ff3936c8b5",
      "new_mode": 33188,
      "new_path": "bgpd/bgp_community.c"
    }
  ]
}
