mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-12 16:03:36 +02:00
nhttpd: change sprintf to snprintf
Origin commit data
------------------
Commit: 0f2ac568c8
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-03-31 (Tue, 31 Mar 2015)
Origin message was:
------------------
nhttpd: change sprintf to snprintf
This commit is contained in:
@@ -300,11 +300,11 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler *, st
|
||||
CEPGData epg;
|
||||
CZapitChannel * channel = channels[j];
|
||||
char buf[100],id[20];
|
||||
sprintf(id,PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS,channel->getChannelID());
|
||||
snprintf(id,sizeof(id),PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS,channel->getChannelID());
|
||||
std::string _sid = std::string(id);
|
||||
sel = (_sid == achannel_id) ? "selected=\"selected\"" : "";
|
||||
CEitManager::getInstance()->getActualEPGServiceKey(channel->getChannelID(), &epg);
|
||||
sprintf(buf,"<option value=" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " %s>%.20s - %.30s</option>\n", channel->getChannelID(), sel.c_str(), channel->getName().c_str(),epg.title.c_str());
|
||||
snprintf(buf,sizeof(buf),"<option value=" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " %s>%.20s - %.30s</option>\n", channel->getChannelID(), sel.c_str(), channel->getName().c_str(),epg.title.c_str());
|
||||
yresult += buf;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user