Commit f1be740
committed
Fix portability and safety issues in pqTraceFormatTimestamp.
Remove confusion between time_t and pg_time_t; neither
gettimeofday() nor localtime() deal in the latter.
libpq indeed has no business using <pgtime.h> at all.
Use snprintf not sprintf, to ensure we can't overrun the
supplied buffer. (Unlikely, but let's be safe.)
Per buildfarm.1 parent 8998e3c commit f1be740
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | | - | |
85 | 83 | | |
86 | 84 | | |
87 | | - | |
88 | | - | |
89 | 85 | | |
90 | 86 | | |
91 | | - | |
| 87 | + | |
92 | 88 | | |
93 | | - | |
| 89 | + | |
| 90 | + | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
| |||
0 commit comments