)]}'
{
  "commit": "1b0d300bd0f047e2edaf9d4b6784189e6c67c3d1",
  "tree": "ce3777527c949add56658e4d5b2ab02781590931",
  "parents": [
    "9b1bf12d5d51bca178dea21b04a0805e29d60cf1"
  ],
  "author": {
    "name": "Xiaotian Feng",
    "email": "dfeng@redhat.com",
    "time": "Wed Oct 27 15:34:08 2010 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Oct 27 18:03:12 2010 -0700"
  },
  "message": "core_pattern: fix truncation by core_pattern handler with long parameters\n\nWe met a parameter truncated issue, consider following:\n\u003e echo \"|/root/core_pattern_pipe_test %p /usr/libexec/blah-blah-blah \\\n%s %c %p %u %g 11 12345678901234567890123456789012345678 %t\" \u003e \\\n/proc/sys/kernel/core_pattern\n\nThis is okay because the strings is less than CORENAME_MAX_SIZE.  \"cat\n/proc/sys/kernel/core_pattern\" shows the whole string.  but after we run\ncore_pattern_pipe_test in man page, we found last parameter was truncated\nlike below:\n\n        argc[10]\u003d\u003c12807486\u003e\n\nThe root cause is core_pattern allows % specifiers, which need to be\nreplaced during parse time, but the replace may expand the strings to\nlarger than CORENAME_MAX_SIZE.  So if the last parameter is % specifiers,\nthe replace code is using snprintf(out_ptr, out_end - out_ptr, ...), this\nwill write out of corename array.\n\n[akpm@linux-foundation.org: coding-style fixes]\nSigned-off-by: Xiaotian Feng \u003cdfeng@redhat.com\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Oleg Nesterov \u003coleg@redhat.com\u003e\nCc: KOSAKI Motohiro \u003ckosaki.motohiro@jp.fujitsu.com\u003e\nReviewed-by: Neil Horman \u003cnhorman@tuxdriver.com\u003e\nCc: Roland McGrath \u003croland@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9722909c4d888ffdfa2743e3d0381c413445d92b",
      "old_mode": 33188,
      "old_path": "fs/exec.c",
      "new_id": "ca01d2d0a6d40d3367723c06f135fce0c1a35a2d",
      "new_mode": 33188,
      "new_path": "fs/exec.c"
    }
  ]
}
