Commit b8755a7
committed
Fix uninitialized variable accesses in sockets/conversions
This was first pointed out in GH-10959.
The from_zval_... functions don't always write to the pointer, in particular
it is necessary to check for an error before using the value. Otherwise
we can access an uninitialized value and that's UB (and dangerous).
Note: this does *NOT* get rid of the compiler warning. Even though there
is error checking now, the compiler isn't smart enough to figure out
that the values can not be used uninitialized.
Closes GH-10966.1 parent bb7dd51 commit b8755a7
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
723 | 727 | | |
724 | 728 | | |
725 | 729 | | |
| |||
1115 | 1119 | | |
1116 | 1120 | | |
1117 | 1121 | | |
1118 | | - | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1119 | 1126 | | |
1120 | 1127 | | |
1121 | 1128 | | |
| |||
0 commit comments