Bug 1057174 - [WebRTC] |DesktopDeviceInfoImpl::initializ| in desktop_device_info.cc use wrong argument while calling snprintf. r=rjesup

This commit is contained in:
Chia-hung Tai 2014-08-22 10:08:24 +08:00
Родитель 9832545241
Коммит e19b965a7f
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -238,11 +238,11 @@ int32_t DesktopDeviceInfoImpl::initializeWindowList() {
pWinDevice->setScreenId(itr->id);
pWinDevice->setDeviceName(itr->title.c_str());
char idStr[64];
char idStr[BUFSIZ];
#if XP_WIN
_snprintf_s(idStr, sizeof(idStr), sizeof(idStr) - 1, "\\win\\%ld", pWinDevice->getScreenId());
#else
snprintf(idStr, BUFSIZ, "\\win\\%ld", pWinDevice->getScreenId());
snprintf(idStr, sizeof(idStr), "\\win\\%ld", pWinDevice->getScreenId());
#endif
pWinDevice->setUniqueIdName(idStr);
desktop_window_list_[pWinDevice->getScreenId()] = pWinDevice;