aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/CheckObject.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-11-01 06:33:40 -0400
committerGitHub <noreply@github.com>2023-11-01 06:33:40 -0400
commit725f765c376dda291d3d5afe5446221a97c189f7 (patch)
treed2c1d77794ba13140aa4a3f0303d56bbec2bd27f /lib/std/Build/Step/CheckObject.zig
parent46062f1c13d8ee9eebf49806660c2271f2acc613 (diff)
parent13b1e10b8f3d8df92417999ed972e5f682c82a46 (diff)
downloadzig-725f765c376dda291d3d5afe5446221a97c189f7.tar.gz
zig-725f765c376dda291d3d5afe5446221a97c189f7.zip
Merge pull request #17802 from jacobly0/read-write-int
mem: fix UB in `readInt`/`writeInt` and delete variants
Diffstat (limited to 'lib/std/Build/Step/CheckObject.zig')
-rw-r--r--lib/std/Build/Step/CheckObject.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/Build/Step/CheckObject.zig b/lib/std/Build/Step/CheckObject.zig
index 2534298854..66bf5cadf3 100644
--- a/lib/std/Build/Step/CheckObject.zig
+++ b/lib/std/Build/Step/CheckObject.zig
@@ -1624,8 +1624,8 @@ const WasmDumper = struct {
switch (opcode) {
.i32_const => try writer.print("i32.const {x}\n", .{try std.leb.readILEB128(i32, reader)}),
.i64_const => try writer.print("i64.const {x}\n", .{try std.leb.readILEB128(i64, reader)}),
- .f32_const => try writer.print("f32.const {x}\n", .{@as(f32, @bitCast(try reader.readIntLittle(u32)))}),
- .f64_const => try writer.print("f64.const {x}\n", .{@as(f64, @bitCast(try reader.readIntLittle(u64)))}),
+ .f32_const => try writer.print("f32.const {x}\n", .{@as(f32, @bitCast(try reader.readInt(u32, .little)))}),
+ .f64_const => try writer.print("f64.const {x}\n", .{@as(f64, @bitCast(try reader.readInt(u64, .little)))}),
.global_get => try writer.print("global.get {x}\n", .{try std.leb.readULEB128(u32, reader)}),
else => unreachable,
}