File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,6 @@ let port_of_int i =
281281 | Error (`Msg msg ) -> failwith msg
282282
283283let parse_cmdline cmd =
284- let cmd = Bytes. to_string cmd in
285284 if cmd.[String. length cmd - 1 ] <> '\x00' then
286285 Lwt. fail_with " Command not null-terminated"
287286 else (
@@ -295,8 +294,9 @@ let exec t ~ty ~handler msg =
295294 Lwt. async (fun () ->
296295 let domid = get_exec_params_connect_domain msg |> Int32. to_int in
297296 let port = get_exec_params_connect_port msg |> port_of_int in
298- let cmdline = Bytes. sub msg sizeof_exec_params (Bytes. length msg) in
299- Log. debug (fun f -> f " Execute %S" (Bytes. to_string cmdline));
297+ let len = Bytes. length msg in
298+ let cmdline = Bytes. sub_string msg sizeof_exec_params (len - sizeof_exec_params) in
299+ Log. debug (fun f -> f " Execute %S" cmdline);
300300 Lwt. finalize
301301 (fun () ->
302302 with_flow ~ty ~domid ~port (fun flow ->
You can’t perform that action at this time.
0 commit comments