forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7d3aece
Fix small overestimation of base64 encoding output length.
pg_base64_enc_len() and its clones overestimated the outputlength by up to 2 bytes, as a result of sloppy thinking aboutwhere to divide. No callers require a precise estimate, sothis has no consequences worse than palloc'ing a byte or twomore than necessary. We might as well get it right though.This bug is very ancient, dating to commit79d78bb whichadded encode.c. (The other instances were presumably copiedfrom there.) Still, it doesn't quite seem worth back-patching.Oleg TselebrovskiyDiscussion:https://postgr.es/m/f94da55286a63022150bc266afdab754@postgrespro.ru1 parent3eb92a3 commit7d3aece
File tree
3 files changed
+3
-3
lines changed- contrib/pgcrypto
- src
- backend/utils/adt
- common
3 files changed
+3
-3
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
168 |
| - | |
| 168 | + | |
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
385 | 385 |
| |
386 | 386 |
| |
387 | 387 |
| |
388 |
| - | |
| 388 | + | |
389 | 389 |
| |
390 | 390 |
| |
391 | 391 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
227 |
| - | |
| 227 | + | |
228 | 228 |
| |
229 | 229 |
| |
230 | 230 |
| |
|
0 commit comments
Comments
(0)