Browse Source

MT#55283 use more appropriate helper function

The string might not be null terminated.

Change-Id: I09d64d69202c8ce7196b8d39223d785353fbd4eb
(cherry picked from commit 19aceecc17)
(cherry picked from commit e2af88650a)
mr13.0.1
Richard Fuchs 1 year ago
parent
commit
db9f7dbcd1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      daemon/redis.c

+ 1
- 1
daemon/redis.c View File

@ -2081,7 +2081,7 @@ static void json_restore_call(struct redis *r, const str *callid, bool foreign)
redis_hash_get_time_t(&c->deleted, &call, "deleted");
redis_hash_get_time_t(&c->ml_deleted, &call, "ml_deleted");
if (!redis_hash_get_str(&id, &call, "created_from"))
c->created_from = call_strdup(id.s);
c->created_from = call_strdup_len(id.s, id.len);
if (!redis_hash_get_str(&id, &call, "created_from_addr")) {
if (sockaddr_parse_any_str(&c->created_from_addr, &id))
goto err8;


Loading…
Cancel
Save