forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0c62356
committed
Add an assertion that we don't pass NULL to snprintf("%s").
Per commite748e90, we appear to have little or no coverage in thebuildfarm of machines that will dump core when asked to printf anull string pointer. Let's try to improve that situation by addingan assertion that will make src/port/snprintf.c behave that way.Since it's just an assertion, it won't break anything in productionbuilds, but it will help developers find this type of oversight.Note that while our buildfarm coverage of machines that use thatsnprintf implementation is pretty thin on the Unix side (apparentlyamounting only to gaur/pademelon), all of the MSVC critters use it.Discussion:https://postgr.es/m/156b989dbc6fe7c4d3223cf51da61195@postgrespro.ru1 parente748e90 commit0c62356
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
745 | 745 |
| |
746 | 746 |
| |
747 | 747 |
| |
| 748 | + | |
| 749 | + | |
748 | 750 |
| |
749 | 751 |
| |
750 | 752 |
| |
|
0 commit comments
Comments
(0)