Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqSSS-0001lq-87 for pgsql-odbc@arkaria.postgresql.org; Sat, 19 Dec 2020 02:59:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kqSSO-0007bn-R8 for pgsql-odbc@arkaria.postgresql.org; Sat, 19 Dec 2020 02:58:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqSSO-0007bg-EZ for pgsql-odbc@lists.postgresql.org; Sat, 19 Dec 2020 02:58:56 +0000 Received: from mx.prosoftsystems.ru ([212.23.72.204]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1kqSSL-0000lf-J2 for pgsql-odbc@postgresql.org; Sat, 19 Dec 2020 02:58:55 +0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_15b7ea3bfae04c7992c6fcc1aaf8a3e5prosoftsystemsru_" DKIM-Signature: v=1; a=rsa-sha256; d=prosoftsystems.ru; s=ps; c=relaxed/relaxed; t=1608346730; h=from:to:date:message-id:subject; bh=eXOMVMYnjZR6y95+k7QGgAEIRwYWadTE4tCDlkmXwyQ=; b=QB1W8ppYRU0HZFqRYVXw9S72QSBXv9XKFbwUAtxOt/UMNLpUnJtpM4dNRkl0yiF5GYaNVIYmChH H6Y6PsxQbbh8USHM4IP6ZrjbnCr76W3+ytch7dscngwtgsbxkcchAhbeEULJ7HRpqRALZv61ed9dW AR2gSZE7xLKCe3fzjbqUAGzRJ5Hv7OA5vpFeKlJZChcsRCwY/NFvwqGdZAkmisT/o2IOKYimmaBXe tLoRDs7TAfVwm5cn+iiVps0Uq3v7NRs/1V0XYwdPlC+Z11wKk88SSaiYPawriVR30MblWsxOOlR+v y/niqBfR5rWDULHFlre9VNOmtDBpDTB2n2hQ== Received: from echo-2.prosoft.ural.ru (172.21.245.22) by mx.prosoftsystems.ru (172.25.245.33) with Microsoft SMTP Server (TLS) id 15.1.396.30; Sat, 19 Dec 2020 07:58:50 +0500 Received: from echo-2.prosoft.ural.ru (172.21.245.22) by echo-2.prosoft.ural.ru (172.21.245.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.595.3; Sat, 19 Dec 2020 07:58:52 +0500 Received: from echo-2.prosoft.ural.ru ([::1]) by echo-2.prosoft.ural.ru ([fe80::2cda:c04e:9fcf:d349%17]) with mapi id 15.02.0595.003; Sat, 19 Dec 2020 07:58:52 +0500 From: =?koi8-r?B?8MXS28nOIODSycog8MXU0s/Xyd4=?= To: "pgsql-odbc@postgresql.org" Subject: READ AV Bug@psqlodbc30a.dll Thread-Topic: READ AV Bug@psqlodbc30a.dll Thread-Index: AdbVsqJBxGKqggvJRteyKea9fB6R8w== Date: Sat, 19 Dec 2020 02:58:52 +0000 Message-ID: <15b7ea3bfae04c7992c6fcc1aaf8a3e5@prosoftsystems.ru> Accept-Language: ru-RU, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.1.89] MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_15b7ea3bfae04c7992c6fcc1aaf8a3e5prosoftsystemsru_ Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable HI! size_t strncpy_null(char *dst, const char *src, ssize_t len) { int i; if (NULL !=3D dst && len > 0) { for (i =3D 0; src[i] && i < len - 1; i++) dst[i] =3D src[i]; dst[i] =3D '\0'; } else return 0; if (src[i]) return strlen(src); <=3D=3D!!! Read after le= n bytes -> access violation under AppVerifier return i; } --_000_15b7ea3bfae04c7992c6fcc1aaf8a3e5prosoftsystemsru_ Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable

HI!

 

size_t

strncpy_null(char *dst, const c= har *src, ssize_t len)

{

     &= nbsp;          int  =             &nb= sp;            =             &nb= sp;  i;

 

     &= nbsp;          if (NULL !=3D d= st && len > 0)

     &= nbsp;          {

     &= nbsp;           &nbs= p;             = for (i =3D 0; src[i] && i < len - 1; i++)

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    dst[i] =3D src[i];

 

     &= nbsp;           &nbs= p;             = dst[i] =3D '\0';

     &= nbsp;          }

     &= nbsp;          else=

     &= nbsp;           &nbs= p;             = return 0;

     &= nbsp;          if (src[i])

     &= nbsp;           &nbs= p;             = return strlen(src); ç= !!! Read after len bytes -> access violation under = AppVerifier

     &= nbsp;          return i;<= /o:p>

}

--_000_15b7ea3bfae04c7992c6fcc1aaf8a3e5prosoftsystemsru_--