Skip to content

fix(ngc): stale gconn ptr after realloc - #3057

Draft
Green-Sky wants to merge 1 commit into
TokTok:masterfrom
Green-Sky:ngc_stale_gconn
Draft

fix(ngc): stale gconn ptr after realloc#3057
Green-Sky wants to merge 1 commit into
TokTok:masterfrom
Green-Sky:ngc_stale_gconn

Conversation

@Green-Sky

@Green-Sky Green-Sky commented May 30, 2026

Copy link
Copy Markdown
Member

Some packet handlers call add_peer() down the call stack, which can realloc the struct array, which gconn is part of.


This change is Reviewable

Some packet handlers call add_peer() down the call stack, which can
realloc the struct array, which gconn is part of.
@Green-Sky Green-Sky added this to the v0.2.24 milestone May 30, 2026
@github-actions github-actions Bot added the bug Bug fix for the user, not a fix to a build script label May 30, 2026
Comment thread toxcore/group_chats.c
}

// realloc might have moved it
gconn = get_gc_connection(chat, peer_number);
@Green-Sky
Green-Sky marked this pull request as draft May 30, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug fix for the user, not a fix to a build script

Development

Successfully merging this pull request may close these issues.

2 participants