Gentlemen,
On 08/22/2015 04:40 PM, Rainer Weikusat wrote:
> Roger Leigh <rleigh@???> writes:
>> On 20/08/2015 11:27, Rainer Weikusat wrote:
>>> Roger Leigh <rleigh@???> writes:
>>>> On 19/08/2015 17:39, Rainer Weikusat wrote:
>
> [...]
>
>>>>> p_len = strlen(IFACES_PATH);
>>>>> e_len = strlen(essid);
>>>>> path = alloca(p_len + e_len + 2);
>>>>>
>>>>> strcpy(path, IFACES_PATH);
>>>>> path[p_len] = '/';
>>>>> strcpy(path + p_len + 1, essid);
>
> [...]
>
I am fully aware of the C string problem.
The code has other problems, too. Edward is not to blame
for this at all, because he is no C programmer.
I am using Edward's submission as template for what the
back-end must understand as arguments, what commandlines it
must execute, what it is supposed to print, how it is
supposed to exit etc. (think contract programming).
Believe me, I already rewrote specifically this section of
the code, so don't bother too much.
On a sidenote, I try to get rid of the exec()s and replace
them with execl()s. I hope the surrounding PASCAL process
thread can handle that in terms of catching the stdout.
Kind regards,
T.