mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
fix uaf on shell IOReader
This commit is contained in:
@@ -8719,7 +8719,8 @@ pub const Interpreter = struct {
|
||||
}
|
||||
|
||||
pub fn __deinit(this: *@This()) void {
|
||||
if (this.fd != bun.invalid_fd) {
|
||||
// windows reader closes the file descriptor
|
||||
if (this.fd != bun.invalid_fd and !bun.Environment.isWindows) {
|
||||
log("IOReader(0x{x}) __deinit fd={}", .{ @intFromPtr(this), this.fd });
|
||||
_ = bun.sys.close(this.fd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user