mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1348] WiFiManager should make defensive copy of hostname #1153
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lptr on GitHub (Jan 26, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1348
Basic Infos
Hardware
WiFimanager Branch/Release: 2.0.5-beta
Hardware: ESP32
Description
WiFiManager::setHostname(char*)should make a defensive copy of parameter value instead of storing the raw parameter value. Currently it is possible to e.g. pass ahostnamevalue that gets freed up beforeWiFi.setHostname()etc., resulting in a corrupted hostname being set.Note:
setCustomHeadElement(char*)probably suffers from the same problem.@tablatronix commented on GitHub (Feb 2, 2022):
YES, I forgot all about this, but saw that a couple weeks ago.
Doesn't esp sethostname take something stange?
@tablatronix commented on GitHub (Feb 5, 2022):
No idea what works best here, ideas? I just changed it to string , it should copy and it seems to work now