pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Першин Юрий Петрович <pershin@prosoftsystems.ru>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: READ AV Bug@psqlodbc30a.dll
Date: Sat, 19 Dec 2020 02:58:52 +0000
Message-ID: <15b7ea3bfae04c7992c6fcc1aaf8a3e5@prosoftsystems.ru> (raw)

HI!

size_t
strncpy_null(char *dst, const char *src, ssize_t len)
{
                int                                          i;

                if (NULL != dst && len > 0)
                {
                               for (i = 0; src[i] && i < len - 1; i++)
                                               dst[i] = src[i];

                               dst[i] = '\0';
                }
                else
                               return 0;
                if (src[i])
                               return strlen(src); <==!!! Read after len bytes -> access violation under AppVerifier
                return i;
}

Message-ID: <15b7ea3bfae04c7992c6fcc1aaf8a3e5@prosoftsystems.ru>
Permalink:  ../15b7ea3bfae04c7992c6fcc1aaf8a3e5@prosoftsystems.ru/
Also on:    postgresql.org/message-id/15b7ea3bfae04c7992c6fcc1aaf8a3e5@prosoftsystems.ru

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: pershin@prosoftsystems.ru
  Subject: Re: READ AV Bug@psqlodbc30a.dll
  In-Reply-To: <15b7ea3bfae04c7992c6fcc1aaf8a3e5@prosoftsystems.ru>
  References: <15b7ea3bfae04c7992c6fcc1aaf8a3e5@prosoftsystems.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox