1.1 --- a/libipc/include/ipc/util_ipc.h Sun Feb 18 01:36:59 2024 +0100
1.2 +++ b/libipc/include/ipc/util_ipc.h Fri Feb 23 01:29:50 2024 +0100
1.3 @@ -40,7 +40,7 @@
1.4 void _export_capability(l4_msgtag_t tag, l4_msg_regs_t *mregs, int item, l4_cap_idx_t ref);
1.5 void _export_fpage(l4_msgtag_t tag, l4_msg_regs_t *mregs, int item, l4_snd_fpage_t fpage);
1.6 void _export_page(l4_msgtag_t tag, l4_msg_regs_t *mregs, int item, l4_umword_t hot_spot, l4_fpage_t fpage);
1.7 -void _free_expected_capabilities(l4_buf_regs_t *bregs, int number);
1.8 +void _free_expected_capabilities(l4_buf_regs_t *bregs, int start, int limit);
1.9 long _import_capability(l4_msgtag_t tag, l4_buf_regs_t *bregs, l4_msg_regs_t *mregs, int item, int buf_item, l4_cap_idx_t *ref, int *local);
1.10 long _import_dataspace(l4_msgtag_t tag, l4_buf_regs_t *bregs, l4_msg_regs_t *mregs, int item, int buf_item, l4re_ds_t *mem, l4_addr_t *addr, int *local);
1.11 long _import_fpage(l4_msgtag_t tag, l4_buf_regs_t *bregs, l4_msg_regs_t *mregs, int item, l4_snd_fpage_t *fpage);
2.1 --- a/libipc/lib/src/message.c Sun Feb 18 01:36:59 2024 +0100
2.2 +++ b/libipc/lib/src/message.c Fri Feb 23 01:29:50 2024 +0100
2.3 @@ -1,7 +1,7 @@
2.4 /*
2.5 * Interprocess communication message abstraction.
2.6 *
2.7 - * Copyright (C) 2018, 2019, 2021, 2022, 2023 Paul Boddie <paul@boddie.org.uk>
2.8 + * Copyright (C) 2018, 2019, 2021-2024 Paul Boddie <paul@boddie.org.uk>
2.9 *
2.10 * This program is free software; you can redistribute it and/or
2.11 * modify it under the terms of the GNU General Public License as
2.12 @@ -63,7 +63,7 @@
2.13
2.14 void ipc_message_free(ipc_message_t *msg)
2.15 {
2.16 - _free_expected_capabilities(&msg->bregs, msg->expected_items);
2.17 + _free_expected_capabilities(&msg->bregs, msg->import_item, msg->expected_items);
2.18 }
2.19
2.20 /* Clear message attributes for sending and response handling. */
3.1 --- a/libipc/lib/src/util_ipc.c Sun Feb 18 01:36:59 2024 +0100
3.2 +++ b/libipc/lib/src/util_ipc.c Fri Feb 23 01:29:50 2024 +0100
3.3 @@ -110,12 +110,12 @@
3.4
3.5 /* Free expected capabilities held by the buffer registers. */
3.6
3.7 -void _free_expected_capabilities(l4_buf_regs_t *bregs, int number)
3.8 +void _free_expected_capabilities(l4_buf_regs_t *bregs, int start, int limit)
3.9 {
3.10 int i;
3.11 l4_cap_idx_t cap;
3.12
3.13 - for (i = 0; i < number; i++)
3.14 + for (i = start; i < limit; i++)
3.15 {
3.16 cap = bregs->br[i] & L4_CAP_MASK;
3.17 if (l4_is_valid_cap(cap))