Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix GH-18148: pg_copy_from() wrong \n offset check. #18149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devnexen wants to merge 1 commit into php:PHP-8.4 from devnexen:gh18148

Conversation

Copy link
Member

@devnexen devnexen commented Mar 26, 2025

No description provided.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable

return;
}
zend_string *zquery = zend_string_alloc(ZSTR_LEN(tmp) + 1, false);
zend_string *zquery = zend_string_alloc(ZSTR_LEN(tmp) + 2, false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a comment for why this is +2?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the input string does not end with a linefeed, space is required for the input string plus a linefeed plus the final nul byte.

Copy link
Member Author

@devnexen devnexen Mar 26, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

She probably got it :) it was more a request than a question I believe, so we do not forget months later.

Copy link

rperske commented Mar 26, 2025

Thank you so much for your ultra-quick fix!

devnexen reacted with thumbs up emoji

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

@Girgias Girgias Girgias approved these changes

+1 more reviewer

@rperske rperske rperske left review comments

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

pg_copy_from no longer accepts linefeed

AltStyle によって変換されたページ (->オリジナル) /