Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8558054

Browse files
committed
Repair PQoidStatus() bug reported by darcy@druid.net.
1 parent 85c17db commit 8558054

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/libpq/fe-exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.98 2001/01/24 19:43:30 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.99 2001/02/06 02:00:09 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2035,7 +2035,7 @@ PQoidStatus(const PGresult *res)
20352035
if (len > 23)
20362036
len = 23;
20372037
strncpy(buf, res->cmdStatus + 7, len);
2038-
buf[23] = '\0';
2038+
buf[len] = '\0';
20392039

20402040
return buf;
20412041
}

0 commit comments

Comments
 (0)