Commit cf20171
committed
ffi: validate DynamicLibrary getter receivers
Bind the path, symbols, and functions getter templates to the
DynamicLibrary constructor signature. This causes V8 to reject
incompatible receivers before invoking the native callbacks,
preventing them from crashing the process.
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol1 parent 2899539 commit cf20171
2 files changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
1238 | 1239 | | |
1239 | 1240 | | |
1240 | 1241 | | |
| 1242 | + | |
1241 | 1243 | | |
1242 | 1244 | | |
1243 | 1245 | | |
1244 | | - | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1245 | 1250 | | |
1246 | 1251 | | |
1247 | 1252 | | |
1248 | 1253 | | |
1249 | 1254 | | |
1250 | | - | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
1251 | 1259 | | |
1252 | 1260 | | |
1253 | 1261 | | |
| |||
1257 | 1265 | | |
1258 | 1266 | | |
1259 | 1267 | | |
1260 | | - | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
1261 | 1272 | | |
1262 | 1273 | | |
1263 | 1274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
127 | 145 | | |
128 | 146 | | |
129 | 147 | | |
| |||
0 commit comments