internal/rosa/package: migrate many libraries

This also adds more string helpers.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-20 03:14:11 +09:00
parent 96abf266dd
commit ef414ab01a
36 changed files with 479 additions and 595 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/src/api.c b/src/api.c
index adccef3..65a277a 100644
--- a/src/api.c
+++ b/src/api.c
@@ -786,7 +786,7 @@ API int seccomp_export_bpf_mem(const scmp_filter_ctx ctx, void *buf,
if (BPF_PGM_SIZE(program) > *len)
rc = _rc_filter(-ERANGE);
else
- memcpy(buf, program->blks, *len);
+ memcpy(buf, program->blks, BPF_PGM_SIZE(program));
}
*len = BPF_PGM_SIZE(program);