[GH-ISSUE #248] WiFiManager (KT version) traps if no networks found in scan #206

Closed
opened 2026-02-28 01:24:04 +03:00 by kerem · 3 comments
Owner

Originally created by @hutch120 on GitHub (Nov 21, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/248

@kentaylor I'm not sure if I'm supposed to report this here given your version is a fork?? Anyway, couldn't see a way to mark this issue to your repo.

Your version traps if wifi scan finds no networks.

In the WiFiManager destructor that runs free(networkIndices), the pointer is uninitalised if there were no networks found during the scan.

To fix, initalise the pointer in WiFiManager.h

int *networkIndices     = NULL;

http://www.cplusplus.com/reference/cstdlib/free/

Cheers,
Simon

Originally created by @hutch120 on GitHub (Nov 21, 2016). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/248 @kentaylor I'm not sure if I'm supposed to report this here given your version is a fork?? Anyway, couldn't see a way to mark this issue to your repo. Your version traps if wifi scan finds no networks. In the WiFiManager destructor that runs free(networkIndices), the pointer is uninitalised if there were no networks found during the scan. To fix, initalise the pointer in WiFiManager.h ``` int *networkIndices = NULL; ``` http://www.cplusplus.com/reference/cstdlib/free/ Cheers, Simon
kerem closed this issue 2026-02-28 01:24:04 +03:00
Author
Owner

@tzapu commented on GitHub (Nov 21, 2016):

feel free to post all stuff here, i see @kentaylor is monitoring issues quite closely

<!-- gh-comment-id:261914353 --> @tzapu commented on GitHub (Nov 21, 2016): feel free to post all stuff here, i see @kentaylor is monitoring issues quite closely
Author
Owner

@kentaylor commented on GitHub (Nov 21, 2016):

Thanks @hutch120. I never would have spotted that. Feel free to do a pull request if you spot other stuff. Pull requests work in a fork.

Also thanks @tzapu, you can't have issues in a fork so it is discuss here or nowhere. I've been watching of late but there are long periods where I don't.

<!-- gh-comment-id:261916103 --> @kentaylor commented on GitHub (Nov 21, 2016): Thanks @hutch120. I never would have spotted that. Feel free to do a pull request if you spot other stuff. Pull requests work in a fork. Also thanks @tzapu, you can't have issues in a fork so it is discuss here or nowhere. I've been watching of late but there are long periods where I don't.
Author
Owner

@tzapu commented on GitHub (Aug 31, 2017):

hi guys, just wanted to mention it s fine to report here, jsut make sure it's obvious is related to ken's fork
and keep up the good work
cheers

<!-- gh-comment-id:326208866 --> @tzapu commented on GitHub (Aug 31, 2017): hi guys, just wanted to mention it s fine to report here, jsut make sure it's obvious is related to ken's fork and keep up the good work cheers
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#206
No description provided.