Commit c5df4fd
committed
util.c: assert that format strings are not empty
If any of these format strings are empty, things can go very wrong at
runtime, from garbage output to segfaults (e.g. see Perl#22375).
This is a static check, so it could be placed in any source file. I
chose util.c because according to the comment at the top, it is the home
of "any stuff that people couldn't think of a better place for".1 parent 335f06f commit c5df4fd
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
124 | 141 | | |
125 | 142 | | |
126 | 143 | | |
| |||
0 commit comments