
Repair copy_frame so it copies at most announced bytes of src into dst, never writes past cap, and treats announced as a claim from the caller instead of a fact.
copy_frame(dst, 16, "deploy", 6)Expected result
ret=0 dst=[deploy]For your own tracking. Tests grade your code.
copy_frame(dst, 16, "oops", 9) // src really holds 4 bytesExpected result
ret=-1 dst=[oops]copy_frame(dst, 5, "frame", 5) // cap counts the terminatorExpected result
ret=-1 dst=[fram]copy_frame(dst, 0, "x", 1)Expected result
ret=-1Expected files
bounded_copy_audit.cAllowed functions
None. Write every helper yourself.
Allowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →Repair copy_frame so it copies at most announced bytes of src into dst, never writes past cap, and treats announced as a claim from the caller instead of a fact.
copy_frame(dst, 16, "deploy", 6)Expected result
ret=0 dst=[deploy]For your own tracking. Tests grade your code.
copy_frame(dst, 16, "oops", 9) // src really holds 4 bytesExpected result
ret=-1 dst=[oops]copy_frame(dst, 5, "frame", 5) // cap counts the terminatorExpected result
ret=-1 dst=[fram]copy_frame(dst, 0, "x", 1)Expected result
ret=-1Expected files
bounded_copy_audit.cAllowed functions
None. Write every helper yourself.
Allowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.