mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-30 09:52:13 +00:00
Fix another issues in json/query for Sdb
This commit is contained in:
parent
45f5a3d31f
commit
71aa477291
@ -89,7 +89,7 @@ SDB_API int sdb_json_set (Sdb *s, const char *k, const char *p, const char *v, u
|
||||
ut32 c;
|
||||
char *js = sdb_get (s, k, &c);
|
||||
if (!js) {
|
||||
char *b = malloc (strlen (k)+strlen (v)+8);
|
||||
char *b = malloc (strlen (p)+strlen (v)+8);
|
||||
if (b) {
|
||||
int is_str = isstring (v);
|
||||
const char *q = is_str?"\"":"";
|
||||
|
@ -92,7 +92,7 @@ static int foreach_list_cb(void *user, const char *k, const char *v) {
|
||||
vlen = strlen (v);
|
||||
if (root) {
|
||||
rlen = strlen (root);
|
||||
line = malloc (klen + vlen + rlen + 2);
|
||||
line = malloc (klen + vlen + rlen + 3);
|
||||
memcpy (line, root, rlen);
|
||||
line[rlen]='/'; /*append the '/' at the end of the namespace */
|
||||
memcpy (line+rlen+1, k, klen);
|
||||
|
Loading…
x
Reference in New Issue
Block a user