interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / qualification / security673 / renames-consumer.om

21 lines · 466 bytes Raw Blame History
1note Synthetic issue671 renames consumer. Creates a source file, then renames from stdin packet.
2note A malformed packet traps 3; a valid packet renames without replacing.
3global pkt uchar 4096
4text src "build/security673-native/ren-src"
5text data "x"
6fn main to int
7fd = fopen src 0 len src 577 384
8if lt fd 0
9ret 90
10end
11r = write int fd data 0 1
12if ne r 1
13ret 91
14end
15if ne fclose int fd 0
16ret 92
17end
18n = ulong read 0 pkt 0 4096
19r = renames pkt 0 n 0
20ret int r
21end