Skip to content
Snippets Groups Projects
Commit 2a542de3 authored by Hauke Mehrtens's avatar Hauke Mehrtens
Browse files

BLE: FileTrans: Null terminate the string

parent 7cef2115
No related branches found
No related tags found
1 merge request!152BLE: FileTrans: Create a directory if needed
......@@ -273,6 +273,7 @@ static uint8_t bleFileOpen(dmConnId_t connId, uint8_t *pValue, uint16_t len)
/* Copy only file path and not type, make sure this is NULL terminated */
strncpy(filepath, (char *)pValue + 1, len - 1);
filepath[len - 1] = 0;
if (file_fd != -1)
epic_file_close(file_fd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment