Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit36fe757

Browse files
author
Michael Meskes
committed
Added missing terminating '\0' char for data put into char *.
1 parent14847af commit36fe757

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,10 @@ Fri Jun 20 15:34:29 CEST 2003
15101510

15111511
- For Informix compatibility we have to accept a "free <cursor>".
15121512
- Synced scan.l and pgc.l.
1513+
1514+
Sun Jun 22 11:20:29 CEST 2003
1515+
1516+
- Fixed missing '\0' in output char pointer.
15131517
- Set ecpg version to 3.0.0
15141518
- Set ecpg library to 4.0.0
15151519
- Set pgtypes library to 1.0.0

‎src/interfaces/ecpg/ecpglib/data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.6 2003/06/19 09:52:11 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.7 2003/06/22 11:00:48 meskes Exp $ */
22

33
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -302,7 +302,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
302302
{
303303
if (varcharsize==0)
304304
{
305-
strncpy((char*) ((long)var+offset*act_tuple),pval,strlen(pval));
305+
strncpy((char*) ((long)var+offset*act_tuple),pval,strlen(pval)+1);
306306
}
307307
else
308308
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp