Hi Aitor,
I edited the code as follows:
if (z == 1)
active_wifi_list = calloc(10, sizeof(void*));
else if (z % 20 == 0)
active_wifi_list = realloc(active_wifis, ((z/2) + 10)*sizeof(void*));
Please, if you can run the code and reply back whether it worked. My
neighbourhood has less than 10 active wifi repeaters.
Edward
On 06/12/2015, Edward Bartolo <edbarx@???> wrote:
> Hi Aitor,
>
> Nevermind, I confirmed it is the same line we are talking about. I
> will investigate the source and reply back.
>
> Edward
>
> On 06/12/2015, Edward Bartolo <edbarx@???> wrote:
>> Hi Aitor,
>>
>> Could you attach the source file so that I would be able to make sure
>> we are talking about the same version?
>>
>> Edward
>>
>> On 06/12/2015, Edward Bartolo <edbarx@???> wrote:
>>> Hi Aitor,
>>>
>>> Is your list of neighbouring active wifi points larger than 9 or 10?
>>> If that is the case, we may have hit an untested code path. I will
>>> review the code and post back.
>>>
>>> Edward
>>>
>>> On 06/12/2015, aitor_czr <aitor_czr@???> wrote:
>>>> Hi all,
>>>>
>>>> In the case of an automatically attempt to connect with netman, i get
>>>> the following error:
>>>>
>>>> $ ./backend 10
>>>> *** Error in `./backend': realloc(): invalid pointer:
>>>> 0x00007ffc3deb55f4
>>>> ***
>>>> Aborted
>>>>
>>>> I believe there is an uncontrolled pointer somewhere...
>>>>
>>>> IMHO (:-) ) the line 238 of ''automated_scanner.c':
>>>>
>>>> active_wifi_list = realloc(active_wifis + 10, sizeof(void*));
>>>>
>>>> should be replaced by this other one:
>>>>
>>>> active_wifi_list = realloc(active_wifi_list, (*active_wifis +
>>>> 9)*sizeof(char*));
>>>>
>>>> Cheers,
>>>>
>>>> Aitor.
>>>>
>>>
>>
>