diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 09:46:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 7a18df8aab1638622ab93fd3203930399c680544 (patch) | |
| tree | ea8616aa0a67a09c0f31dd67f507a88e2fc4f87f /src/ninep/cols.zig | |
| parent | 157df8cb547ba4cf900b1f9eb75df15384985708 (diff) | |
| download | pardes-7a18df8aab1638622ab93fd3203930399c680544.tar.gz pardes-7a18df8aab1638622ab93fd3203930399c680544.zip | |
A tag write refuses NUL and the other control characters; a Dump that fails says so
A NUL written into a tag went into the dump, which the host then could
not write, and Dump said nothing: a success that wrote nothing. Tag
writes, the workspace's, a column's and a pane's, refuse control
characters but tab and newline, DEL, C1 and bytes not UTF-8, EINVAL; and
Dump reports any failure of its own instead of swallowing it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/cols.zig')
| -rw-r--r-- | src/ninep/cols.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig index 3eeadfdc..aae6d364 100644 --- a/src/ninep/cols.zig +++ b/src/ninep/cols.zig @@ -78,6 +78,7 @@ pub fn read(p: *Pardes, req: Req, serial: ?u32) Reply { pub fn write(p: *Pardes, req: Req, serial: ?u32) Reply { const t = (header(p, serial) orelse return Reply.fail(req.tag, E.NOENT)).text; if (req.data.len == 0) return .{ .tag = req.tag, .written = 0 }; + if (pardes.ctlfs.pane.tagFault(req.data)) |why| return tree.failText(req.tag, E.INVAL, why); const was = headerText(p, serial).?; var data = req.data; const rewriting = p.fs.header_rewrite == rewriteKey(serial); |
