postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: progmachine (@progmachine) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: Re: [postgresql-interfaces/psqlodbc] PR #18: Notes todo and attempt to fix memory leak
Date: Tue, 14 May 2024 10:10:05 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
(on connection.c:576)
Potential infinite loop, if two sibling array entries is `NULL`.
Potential run out of array borders, if `i` is index of last array element. ASAN will kick you in this place =)
To do such algorithm of cleaning `NULL` pointers out, you need two index variables: `idst` for place you write non-null pointer, `isrc` for place you get that non-null pointer, and isrc goes forward faster than `idst`. After `isrc` reaches end of array, `idst` will be new elements count.
view thread (7+ messages) latest in thread
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 #18: Notes todo and attempt to fix memory leak
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