Skip to content

Commit

Permalink
PVRClient: Do not overwrite arbitrary memory
Browse files Browse the repository at this point in the history
  • Loading branch information
fritsch committed Dec 31, 2018
1 parent 8dfb253 commit bf54246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xbmc/addons/PVRClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ bool CPVRClient::GetAddonProperties(void)
: 821; // "One time (guide-based)
}
std::string descr(g_localizeStrings.Get(id));
strncpy(types_array[i].strDescription, descr.c_str(), descr.size());
strncpy(types_array[i].strDescription, descr.c_str(), std::min(descr.size(), static_cast<size_t>(PVR_ADDON_TIMERTYPE_STRING_LENGTH - 1)));
}
timerTypes.emplace_back(CPVRTimerTypePtr(new CPVRTimerType(types_array[i], m_iClientId)));
}
Expand Down

0 comments on commit bf54246

Please sign in to comment.