diff options
Diffstat (limited to 'meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch')
| -rw-r--r-- | meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch b/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch new file mode 100644 index 0000000000..d29d9118dc --- /dev/null +++ b/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 9be71700eb580c815688584a64621a38867c3fdd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: James Myatt <james.myatt@tessella.com> | ||
| 3 | Date: Thu, 5 Feb 2015 15:57:14 +0000 | ||
| 4 | Subject: [PATCH] json_tokener requires INF and NAN | ||
| 5 | |||
| 6 | --- | ||
| 7 | Upstream-Status: Backport | ||
| 8 | |||
| 9 | json_tokener.c | 3 ++- | ||
| 10 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 11 | |||
| 12 | Index: json-c-0.12/json_tokener.c | ||
| 13 | =================================================================== | ||
| 14 | --- json-c-0.12.orig/json_tokener.c | ||
| 15 | +++ json-c-0.12/json_tokener.c | ||
| 16 | @@ -16,6 +16,7 @@ | ||
| 17 | #include "config.h" | ||
| 18 | |||
| 19 | #include <math.h> | ||
| 20 | +#include "math_compat.h" | ||
| 21 | #include <stdio.h> | ||
| 22 | #include <stdlib.h> | ||
| 23 | #include <stddef.h> | ||
| 24 | @@ -352,12 +353,10 @@ struct json_object* json_tokener_parse_e | ||
| 25 | |||
| 26 | case json_tokener_state_inf: /* aka starts with 'i' */ | ||
| 27 | { | ||
| 28 | - int size; | ||
| 29 | - int size_inf; | ||
| 30 | + size_t size_inf; | ||
| 31 | int is_negative = 0; | ||
| 32 | |||
| 33 | printbuf_memappend_fast(tok->pb, &c, 1); | ||
| 34 | - size = json_min(tok->st_pos+1, json_null_str_len); | ||
| 35 | size_inf = json_min(tok->st_pos+1, json_inf_str_len); | ||
| 36 | char *infbuf = tok->pb->buf; | ||
| 37 | if (*infbuf == '-') | ||
