Message-ID: From: "micahdbak (@micahdbak)" To: "postgresql-interfaces/psqlodbc" Date: Thu, 10 Apr 2025 22:47:09 +0000 Subject: [postgresql-interfaces/psqlodbc] PR #106: chore: update makeConnectString to not overflow connect_string where len < MAX_CONNECT_STRING List-Id: X-GitHub-Author-Id: 114637762 X-GitHub-Author-Login: micahdbak X-GitHub-Issue: 106 X-GitHub-Repo: postgresql-interfaces/psqlodbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/postgresql-interfaces/psqlodbc/pull/106 Content-Type: text/plain; charset=utf-8 The current implementation of makeConnectString assumes that the input connect_string has size >= MAX_CONNECT_STRING, despite taking in a length argument. The updated version ensures that the output string has min(len, MAX_CONNECT_STRING) chars written, properly terminated for either case.