Skip to content

Commit

Permalink
Merge pull request #726 from openziti/fix-use-after-stack-scope
Browse files Browse the repository at this point in the history
fix use after stack scope
  • Loading branch information
ekoby authored Sep 16, 2024
2 parents 97f1974 + 9e6ec86 commit 0b0d233
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ message *create_message(struct ziti_conn *conn, uint32_t content, uint32_t flags

int32_t conn_id = htole32(conn->conn_id);
int32_t msg_seq = htole32(conn->edge_msg_seq++);
uint32_t msg_flags = htole32(flags);
struct msg_uuid uuid = {
.ts = uv_now(conn->ziti_ctx->loop),
.seq = msg_seq,
Expand All @@ -269,7 +270,6 @@ message *create_message(struct ziti_conn *conn, uint32_t content, uint32_t flags
mk_hdr(hcount, UUIDHeader, sizeof(uuid.raw), uuid.raw);
}
if (flags != 0) {
uint32_t msg_flags = htole32(flags);
mk_hdr(hcount, FlagsHeader, sizeof(msg_flags), &msg_flags);
}

Expand Down

0 comments on commit 0b0d233

Please sign in to comment.