儲存庫 vbox 的更動 63262
- 時間撮記:
- 2016-8-10 下午01:09:42 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/NetworkServices/DHCP/Config.cpp
r62481 r63262 85 85 int BaseConfigEntity::match(Client& client, BaseConfigEntity **cfg) 86 86 { 87 int iMatch = (m_criteria && m_criteria->check(client) ? m_MatchLevel: 0);87 int iMatch = (m_criteria && m_criteria->check(client) ? m_MatchLevel : 0); 88 88 if (m_children.empty()) 89 89 { … … 238 238 Client c(data); 239 239 int rc = g_RootConfig->match(c, (BaseConfigEntity **)&pNetCfg); 240 Assert(rc >= 0 && pNetCfg); 240 Assert(rc >= 0 && pNetCfg); RT_NOREF(rc); 241 241 242 242 l.setConfig(pNetCfg); … … 358 358 * Search the vendor field. 359 359 */ 360 bool fExtended = false;361 360 uint8_t const *pb = &pDhcpMsg->bp_vend.Dhcp.dhcp_opts[0]; 362 361 while (pb && cbLeft > 0) … … 372 371 else 373 372 { 374 size_t cbCur = pb[1];373 uint8_t cbCur = pb[1]; 375 374 if (cbCur > cbLeft - 2) 376 cbCur = cbLeft - 2;375 cbCur = (uint8_t)(cbLeft - 2); 377 376 if (uCur == uOption) 378 377 { … … 652 651 653 652 654 const std::string &ConfigurationManager::getString(uint8_t u8OptId)653 const std::string &ConfigurationManager::getString(uint8_t u8OptId) 655 654 { 656 655 switch (u8OptId) … … 659 658 if (m->m_domainName.length()) 660 659 return m->m_domainName; 661 else 662 return m_noString; 660 return m_noString; 663 661 default: 664 662 break; … … 1204 1202 } 1205 1203 1206 char *pszDomainName = (char *)&opt.au8RawOpt[0]; 1207 1208 strcpy(pszDomainName, domainName.c_str()); 1209 opt.cbRawOpt = domainName.length(); 1204 size_t cchLength = domainName.length(); 1205 if (cchLength >= sizeof(opt.au8RawOpt)) 1206 cchLength = sizeof(opt.au8RawOpt) - 1; 1207 memcpy(&opt.au8RawOpt[0], domainName.c_str(), cchLength); 1208 opt.au8RawOpt[cchLength] = '\0'; 1209 opt.cbRawOpt = (uint8_t)cchLength; 1210 1210 } 1211 1211 break;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器