aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bne.c2
-rw-r--r--src/pack.c2
-rw-r--r--src/proone-pack.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/bne.c b/src/bne.c
index a0f64d3..41022e0 100644
--- a/src/bne.c
+++ b/src/bne.c
@@ -1389,7 +1389,7 @@ static bool bne_sh_start_rcb (prne_bne_t *ctx, bne_sh_ctx_t *sh_ctx) {
ctx->result.prc = prne_start_bin_rcb_compat(
&sh_ctx->rcb,
ctx->result.bin_host,
- NULL,
+ ctx->param.rcb->self,
ctx->param.rcb->m_self,
ctx->param.rcb->self_len,
ctx->param.rcb->exec_len,
diff --git a/src/pack.c b/src/pack.c
index b1e6a36..fa0d19c 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -309,7 +309,7 @@ static ssize_t pack_rcb_dvread_f (
nb_bin_loc = ctx->buf + ctx->buf_len + 6;
ctx->buf_len += 8;
- if (ctx->self.arch != PRNE_ARCH_NONE) {
+ if (prne_bin_host_inrange(&ctx->self)) {
ctx->buf[ctx->buf_len + 0] = 0;
ctx->buf[ctx->buf_len + 1] = 0;
ctx->buf[ctx->buf_len + 2] = (uint8_t)ctx->self.os;
diff --git a/src/proone-pack.c b/src/proone-pack.c
index ad2a75c..0078413 100644
--- a/src/proone-pack.c
+++ b/src/proone-pack.c
@@ -265,9 +265,11 @@ static bool do_rcb (const char *prefix) {
prne_free(out_path);
out_path = prne_alloc_str(
- prefix_len + 1 + strlen(arch_str));
+ prefix_len + 1 + strlen(os_str) + 1 + strlen(arch_str));
strcpy(out_path, prefix);
strcat(out_path, ".");
+ strcat(out_path, os_str);
+ strcat(out_path, ".");
strcat(out_path, arch_str);
fd = open(out_path, O_WRONLY | O_CREAT | O_TRUNC, 0755);