forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf1be740
committed
Fix portability and safety issues in pqTraceFormatTimestamp.
Remove confusion between time_t and pg_time_t; neithergettimeofday() 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 thesupplied buffer. (Unlikely, but let's be safe.)Per buildfarm.1 parent8998e3c commitf1be740
1 file changed
+3
-6
lines changedLines changed: 3 additions & 6 deletions
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
Comments
(0)