Skip site navigation (1) Skip section navigation (2)

Patch for libpgtcl

From: jwieck(at)debis(dot)com (Jan Wieck)
To: pgsql-hackers(at)postgreSQL(dot)org (PostgreSQL HACKERS)
Subject: Patch for libpgtcl
Date: 1998-10-01 11:06:42
Message-ID: m0zOgZH-000EBQC@orion.SAPserv.Hamburg.dsh.de (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

    found a little bug in libpgtcl/pgtclCmds.c causing a
    segmentation fault. Please apply.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

*** pgtclCmds.c.orig	Thu Oct  1 09:15:11 1998
--- pgtclCmds.c	Thu Oct  1 12:59:59 1998
***************
*** 241,258 ****
  {
  	PQconninfoOption *option;
  	char		buf[8192];
  
  	Tcl_ResetResult(interp);
  	for (option = PQconndefaults(); option->keyword != NULL; option++)
  	{
! 		if (option->val == NULL)
! 			option->val = "";
  		sprintf(buf, "{%s} {%s} {%s} %d {%s}",
  				option->keyword,
  				option->label,
  				option->dispchar,
  				option->dispsize,
! 				option->val);
  		Tcl_AppendElement(interp, buf);
  	}
  
--- 241,258 ----
  {
  	PQconninfoOption *option;
  	char		buf[8192];
+ 	char		*val;
  
  	Tcl_ResetResult(interp);
  	for (option = PQconndefaults(); option->keyword != NULL; option++)
  	{
! 		val = (option->val == NULL) ? "" : option->val;
  		sprintf(buf, "{%s} {%s} {%s} %d {%s}",
  				option->keyword,
  				option->label,
  				option->dispchar,
  				option->dispsize,
! 				val);
  		Tcl_AppendElement(interp, buf);
  	}
  

pgsql-hackers by date

Next:From: Joost KraaijeveldDate: 1998-10-01 12:36:16
Subject: Initdb questions Windows NT port
Previous:From: Magnus HaganderDate: 1998-10-01 10:53:15
Subject: RE: [HACKERS] LIBPQ for WIN32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group