Commit e930c87
committed
Use safe string copy routine
Using memcpy with strlen as the size parameter will not take the
NULL terminator into account, relying instead on the destination
buffer being properly initialized. Replace with strlcpy which is
a safer alternative, and more in line with how we handle copying
strings elsewhere.
Author: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://postgr.es/m/CAEudQApAsbLsQ+gGiw-hT+JwGhgogFa_=5NUkgFO6kOPxyNidQ@mail.gmail.com1 parent da3ea04 commit e930c87
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8744 | 8744 | | |
8745 | 8745 | | |
8746 | 8746 | | |
8747 | | - | |
| 8747 | + | |
8748 | 8748 | | |
8749 | 8749 | | |
8750 | 8750 | | |
| |||
0 commit comments