summaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-07-12 18:38:47 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-07-12 18:38:47 +0000
commit7b06ee55fb57ee3d1695ac3ffcd600c660a414ff (patch)
tree321db1660b3b5ebfa5b1f66a86c6c95a18301a3d /json.h
parentdb6cf0bf7fb656dcf71641a39294193aa4c58629 (diff)
downloadgpsd-7b06ee55fb57ee3d1695ac3ffcd600c660a414ff.tar.gz
Use properly bounded copies for JSON string fields.
Diffstat (limited to 'json.h')
-rw-r--r--json.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/json.h b/json.h
index 6a6cb33e..34b98c06 100644
--- a/json.h
+++ b/json.h
@@ -15,9 +15,12 @@ struct json_attr_t {
union {
int *integer;
double *real;
- char *string;
+ struct {
+ char *ptr;
+ int len;
+ } string;
bool *boolean;
- struct json_array_t array;
+ struct json_array_t *array;
} addr;
union {
int integer;