postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: ColinKYuen (@ColinKYuen) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: [postgresql-interfaces/psqlodbc] PR #108: feat: safe sscanf
Date: Sat, 12 Apr 2025 00:14:28 +0000
Message-ID: <[email protected]> (raw)
## Summary
Replaces the usages of sscanf() for a safer implementation
## Description
For character strings, the standard library uses the convention that strings are null-terminated: a string of n characters is represented as an array of n + 1 elements, the last of which is a NUL character ('\0'). For input conversion to various types, the C library provides the scanf() function family. The scanf() family of functions scans input according to supplied format string. This format may contain conversion specifications; the results from such conversions, if any, are stored in the locations pointed to by the pointer arguments that follow format. Each pointer argument must be of a type that is appropriate for the value returned by the corresponding conversion specification. scanf() also does not check the bounds of the inputs and may cause buffer overflows.
## Testing
The regression tests have been built on
- Windows 11, 24H2
- Linux, Ubuntu 24
- & M4 Max Mac, Sequoia 15.3.2
The test results match what is currently on mainline
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://postgresql-interfaces/psqlodbc
Cc: [email protected], [email protected]
Subject: Re: [postgresql-interfaces/psqlodbc] PR #108: feat: safe sscanf
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox