Skip to content

Commit fee6fd7

Browse files
author
Michael Meskes
committed
Fix segfault in connect in informix mode.
1 parent 91d6063 commit fee6fd7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,10 @@ Fri Jul 4 13:51:11 CEST 2003
15541554
Mon Jul 7 14:13:43 CEST 2003
15551555

15561556
- Made sure "char *" is handled differently than "char []".
1557+
1558+
Tue Jul 8 09:04:31 CEST 2003
1559+
1560+
- Fixed segfault in ECPGconnect in Informix mode.
15571561
- Set ecpg version to 3.0.0
15581562
- Set ecpg library to 4.0.0
15591563
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/ecpglib/connect.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.10 2003/07/01 12:40:51 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.11 2003/07/08 07:13:48 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -324,8 +324,8 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
324324
envname = getenv("PG_DBPATH");
325325
if (envname)
326326
{
327-
free(dbname);
328-
dbname = envname;
327+
ECPGfree(dbname);
328+
dbname = strdup(envname);
329329
}
330330

331331
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy