diff options
author | Thijs Paelman <[email protected]> | 2023-12-28 09:01:45 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2023-12-31 16:48:02 +0100 |
commit | 9bae90546e50aa317cc6676a1968e1a6ccae5ab3 (patch) | |
tree | bfbbb2514f3fd7d7e52305769d5a3be2ada11d17 /src/ipcpd/unicast/routing.c | |
parent | 863553891b296c5574d6b0893ad21fe16b97a6ea (diff) | |
download | ouroboros-9bae90546e50aa317cc6676a1968e1a6ccae5ab3.tar.gz ouroboros-9bae90546e50aa317cc6676a1968e1a6ccae5ab3.zip |
irmd: Fix parsing multiple args in configfile
New method retains the original string in parsing the args string into
an argv dynamic array. Previous method (`strtok`) didn't work,
because it is a destructive function, changing the supplied string. We
however needed to apply it twice to the same string. It is still done
twice in a loop, to make sure argc is exact. Other methods, like
counting the amount of spaces to determine argc, would be incorrect
for his particular way of tokenizing if arguments are separated by
e.g. two spaces.
Also fixes a wrong pointer dereference, which did go unnoticed before
due to the previous error.
Signed-off-by: Thijs Paelman <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/unicast/routing.c')
0 files changed, 0 insertions, 0 deletions