Commit 897068e
fs: clobber req->path on uv_fs_mkstemp() error
Contents of template variable passed for posix call mkstemp on error
code EINVAL is unknown. On AIX platform, template will get clobbered
on EINVAL and any attempt to read template might result in error.
In libuv, req->path is passed directly to the mkstemp call and
behavior of this string on error is platform dependent. To avoid
portability issues, it's better to have a common behavior on all
platform. For both unix and windows platform libuv will rewrite path
with an empty string on all error cases.
Fixes: libuv#2913
Refs: nodejs/node#33549
Refs: libuv#2933
PR-URL: libuv#2938
Reviewed-By: Jameson Nash <[email protected]>1 parent 1de2f0d commit 897068e
3 files changed
+22
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
324 | | - | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
1244 | | - | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
1245 | 1247 | | |
1246 | 1248 | | |
1247 | 1249 | | |
1248 | 1250 | | |
1249 | | - | |
| 1251 | + | |
1250 | 1252 | | |
1251 | 1253 | | |
1252 | 1254 | | |
1253 | 1255 | | |
1254 | 1256 | | |
1255 | 1257 | | |
1256 | | - | |
| 1258 | + | |
1257 | 1259 | | |
1258 | 1260 | | |
1259 | 1261 | | |
| |||
1264 | 1266 | | |
1265 | 1267 | | |
1266 | 1268 | | |
1267 | | - | |
1268 | | - | |
| 1269 | + | |
| 1270 | + | |
1269 | 1271 | | |
1270 | | - | |
| 1272 | + | |
1271 | 1273 | | |
1272 | 1274 | | |
1273 | 1275 | | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1277 | 1280 | | |
1278 | 1281 | | |
1279 | 1282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
1293 | | - | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1294 | 1297 | | |
1295 | 1298 | | |
1296 | 1299 | | |
| |||
0 commit comments