Files
kubernetes/pkg/runtime
juanvallejo 07ca219828 Prevent json decoder panic on invalid input
This patch handles cases where `ioutil.ReadAll` will return a single
character output on an invalid json input, causing the `Decode` method
to panic when it tries to calculate the line number for the syntax
error. The example below would cause a panic due to the trailing comma
at the end:

```
{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "",
    "labels": {
      "name": ""
    },
    "generateName": "",
    "namespace": "",
    "annotations": []
  },
  "spec": {}
},
```
2016-12-09 16:32:46 -05:00
..
2016-11-23 22:30:47 -06:00
2016-12-03 19:10:46 -05:00
2016-11-23 22:30:47 -06:00
2016-11-23 22:30:47 -06:00
2016-11-23 22:30:47 -06:00
2016-07-16 13:48:21 -04:00
2016-11-23 22:30:47 -06:00
2016-11-23 22:30:47 -06:00
2016-11-23 22:30:47 -06:00
2016-10-13 21:22:59 -07:00
2016-11-23 22:30:47 -06:00
2016-11-23 22:30:47 -06:00
2016-03-04 23:59:34 -05:00
2016-11-23 22:30:47 -06:00
2016-11-23 22:30:47 -06:00
2016-11-23 22:30:47 -06:00
2016-12-03 19:10:46 -05:00
2016-12-03 19:10:46 -05:00