Skip to content

Commit 96be4b2

Browse files
author
Michael Meskes
committed
Applied patch to fix two compatibility functions.
1 parent ffcb149 commit 96be4b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/interfaces/ecpg/compatlib/informix.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ rdatestr (Date d, char *str)
415415
return -1210;
416416

417417
/* move to user allocated buffer */
418-
strcpy(tmp, str);
419-
free(str);
418+
strcpy(str, tmp);
419+
free(tmp);
420420

421421
return 0;
422422
}
@@ -532,6 +532,10 @@ dtsub (Timestamp *ts1, Timestamp *ts2, Interval *iv)
532532
int
533533
dttoasc (Timestamp *ts, char *output)
534534
{
535+
char *asctime = PGTYPEStimestamp_to_asc( *ts );
536+
537+
strcpy (output, asctime);
538+
free(asctime);
535539
return 0;
536540
}
537541

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