MT#55283 use more appropriate helper function

The string might not be null terminated.

Change-Id: I09d64d69202c8ce7196b8d39223d785353fbd4eb
pull/1884/head
Richard Fuchs 1 year ago
parent b805252b94
commit 19aceecc17

@ -2111,7 +2111,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->deleted, &call, "deleted");
redis_hash_get_time_t(&c->ml_deleted, &call, "ml_deleted"); redis_hash_get_time_t(&c->ml_deleted, &call, "ml_deleted");
if (!redis_hash_get_str(&id, &call, "created_from")) if (!redis_hash_get_str(&id, &call, "created_from"))
c->created_from = call_strdup(id.s); c->created_from = call_strdup_str(&id);
if (!redis_hash_get_str(&id, &call, "created_from_addr")) { if (!redis_hash_get_str(&id, &call, "created_from_addr")) {
if (sockaddr_parse_any_str(&c->created_from_addr, &id)) if (sockaddr_parse_any_str(&c->created_from_addr, &id))
goto err8; goto err8;

Loading…
Cancel
Save