]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Repair PQoidStatus() bug reported by darcy@druid.net.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Feb 2001 02:00:09 +0000 (02:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Feb 2001 02:00:09 +0000 (02:00 +0000)
src/interfaces/libpq/fe-exec.c

index e25e3a1574480b53f6ee5a2eb29b14b3bc12551f..36b64f55f10ae5138d12b3ee2f0d4f2d7d5a6024 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.98 2001/01/24 19:43:30 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.99 2001/02/06 02:00:09 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -2035,7 +2035,7 @@ PQoidStatus(const PGresult *res)
        if (len > 23)
                len = 23;
        strncpy(buf, res->cmdStatus + 7, len);
-       buf[23] = '\0';
+       buf[len] = '\0';
 
        return buf;
 }