Skip to content

Buffer limit for example UDR replicate#9013

Open
Ev3nt wants to merge 1 commit intoFirebirdSQL:masterfrom
Ev3nt:udr_replicate_fix
Open

Buffer limit for example UDR replicate#9013
Ev3nt wants to merge 1 commit intoFirebirdSQL:masterfrom
Ev3nt:udr_replicate_fix

Conversation

@Ev3nt
Copy link
Copy Markdown
Contributor

@Ev3nt Ev3nt commented Apr 28, 2026

Summary

Buffer with a static size of 65536 may be overflowing.

Details

The replicate implementation uses unsafe strcat and snprintf because there are no size checks. If the buffer overflows, a crash occurs.

@AlexPeshkoff
Copy link
Copy Markdown
Member

Must say that in EXAMPLE, which is targeted to show users how to work with particular firebird feature, adding so much implementation details to avoid BOF is (on my mind) not good idea.

@asfernandes
Copy link
Copy Markdown
Member

Agree with Alex.
I could see some value in using std::string or std::vector and avoid Firebird common classes or too much implementation for what the standard already provides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants