Skip to content

chore: replace unsafe string-to-number conversions #103

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

Conversation

faviansamatha
Copy link
Contributor

@faviansamatha faviansamatha commented Apr 8, 2025

The following functions

atoi()
atol()
atoll()
atof()

have been deprecated by the strto... variants.

This commit adds a new set of macros prefixed with pg_ in psqlodbc.h to convert the ato..() calls to their respective strto... versions.

@faviansamatha faviansamatha force-pushed the sfavian/fix-dangerous-conversions branch from 910cd79 to 63846de Compare April 8, 2025 21:30
@faviansamatha faviansamatha marked this pull request as ready for review April 8, 2025 22:11
@faviansamatha
Copy link
Contributor Author

Looks like the wix installation step failed in the github actions workflow. They released v6.0 a few days ago iirc.

@davecramer
Copy link
Contributor

Just rebase as I merged in a fix this morning #104

@faviansamatha faviansamatha force-pushed the sfavian/fix-dangerous-conversions branch from da433aa to 9e26ed4 Compare April 9, 2025 16:23
@faviansamatha
Copy link
Contributor Author

Done! Just rebased

@davecramer davecramer merged commit 73710c6 into postgresql-interfaces:main Apr 10, 2025
1 check passed
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.

2 participants