postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)help / color / mirror / Atom feed
[postgresql-interfaces/psqlodbc] PR #174: Fix stack buffer overflow in getPrecisionPart() (GitHub #173) 2+ messages / 2 participants [nested] [flat]
* [postgresql-interfaces/psqlodbc] PR #174: Fix stack buffer overflow in getPrecisionPart() (GitHub #173) @ 2026-04-22 11:05 "davecramer (@davecramer)" <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: davecramer (@davecramer) @ 2026-04-22 11:05 UTC (permalink / raw) To: postgresql-interfaces/psqlodbc <[email protected]> Clamp precision to the buffer size (9) before writing the NUL terminator in getPrecisionPart(). Previously, a precision value > 9 would write past the end of the local fraction[] buffer, corrupting the stack. Also fix SQLSetDescField for ARD records: setting SQL_DESC_PRECISION, SQL_DESC_SCALE, or SQL_DESC_OCTET_LENGTH no longer nulls the data buffer. The unbind logic was incorrectly applied to these metadata fields, causing any descriptor precision override to silently unbind the column. Add interval-overflow regression test that exercises both fixes by fetching an interval with fractional seconds using precision=20 via the ARD. Fixes Issue #173 Reported by [@jarvis24young](https://github.com/jarvis24young) in [#173](https://github.com/postgresql-interfaces/psqlodbc/issues/173) ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [postgresql-interfaces/psqlodbc] PR #174: Fix stack buffer overflow in getPrecisionPart() (GitHub #173) @ 2026-04-23 03:48 "jarvis24young (@jarvis24young)" <[email protected]> 0 siblings, 0 replies; 2+ messages in thread From: jarvis24young (@jarvis24young) @ 2026-04-23 03:48 UTC (permalink / raw) To: postgresql-interfaces/psqlodbc <[email protected]> thx @davecramer ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-04-23 03:48 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-04-22 11:05 [postgresql-interfaces/psqlodbc] PR #174: Fix stack buffer overflow in getPrecisionPart() (GitHub #173) "davecramer (@davecramer)" <[email protected]> 2026-04-23 03:48 Re: [postgresql-interfaces/psqlodbc] PR #174: Fix stack buffer overflow in getPrecisionPart() (GitHub #173) "jarvis24young (@jarvis24young)" <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox