18 lines
875 B
Markdown
18 lines
875 B
Markdown
|
|
# Cherry-pick upstream PR #939 — dangling pointer fix
|
||
|
|
|
||
|
|
## Task
|
||
|
|
Cherry-pick commit `b47e1f6` from upstream PR [#939](https://github.com/crosspoint-reader/crosspoint-reader/pull/939) into `mod/master`.
|
||
|
|
|
||
|
|
## Changes
|
||
|
|
- **File**: `src/activities/home/MyLibraryActivity.cpp` (lines 199-200)
|
||
|
|
- **Fix**: Changed `folderName` from `auto` (deduced as `const char*` pointing to a temporary) to `std::string`, and called `.c_str()` at the point of use instead. This eliminates a dangling pointer caused by `.c_str()` on a temporary `std::string` from `basepath.substr(...)`.
|
||
|
|
|
||
|
|
## Method
|
||
|
|
- Fetched PR ref via `git fetch upstream pull/939/head:pr-939`
|
||
|
|
- Cherry-picked `b47e1f6` — applied cleanly with no conflicts
|
||
|
|
- Build verified: SUCCESS (PlatformIO, 68s)
|
||
|
|
- Cleaned up temporary `pr-939` branch ref
|
||
|
|
|
||
|
|
## Follow-up
|
||
|
|
- None required. The commit preserves original authorship (Uri Tauber).
|