From 5fc3339bc0fd3aec786bf014f2ddf0d327133976 Mon Sep 17 00:00:00 2001 From: Rumesh Date: Mon, 21 Oct 2019 19:05:34 +0530 Subject: [PATCH] Specify second parameter for parseInt for pubmaticBidAdapter --- modules/pubmaticBidAdapter.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/pubmaticBidAdapter.js b/modules/pubmaticBidAdapter.js index 59f0f7a7db8..c20a1d2f157 100644 --- a/modules/pubmaticBidAdapter.js +++ b/modules/pubmaticBidAdapter.js @@ -174,8 +174,8 @@ function _parseAdSlot(bid) { utils.logWarn(LOG_WARN_PREFIX + 'AdSlot Error: adSlot not in required format'); return; } - bid.params.width = parseInt(splits[0]); - bid.params.height = parseInt(splits[1]); + bid.params.width = parseInt(splits[0], 10); + bid.params.height = parseInt(splits[1], 10); } else if (bid.hasOwnProperty('mediaTypes') && bid.mediaTypes.hasOwnProperty(BANNER) && bid.mediaTypes.banner.hasOwnProperty('sizes')) { @@ -441,8 +441,8 @@ function _createBannerRequest(bid) { utils.logWarn(LOG_WARN_PREFIX + 'Error: mediaTypes.banner.size missing for adunit: ' + bid.params.adUnit + '. Ignoring the banner impression in the adunit.'); return bannerObj; } else { - bannerObj.w = parseInt(sizes[0][0]); - bannerObj.h = parseInt(sizes[0][1]); + bannerObj.w = parseInt(sizes[0][0], 10); + bannerObj.h = parseInt(sizes[0][1], 10); sizes = sizes.splice(1, sizes.length - 1); } } else { @@ -482,11 +482,11 @@ function _createVideoRequest(bid) { } // read playersize and assign to h and w. if (utils.isArray(bid.mediaTypes.video.playerSize[0])) { - videoObj.w = parseInt(bid.mediaTypes.video.playerSize[0][0]); - videoObj.h = parseInt(bid.mediaTypes.video.playerSize[0][1]); + videoObj.w = parseInt(bid.mediaTypes.video.playerSize[0][0], 10); + videoObj.h = parseInt(bid.mediaTypes.video.playerSize[0][1], 10); } else if (utils.isNumber(bid.mediaTypes.video.playerSize[0])) { - videoObj.w = parseInt(bid.mediaTypes.video.playerSize[0]); - videoObj.h = parseInt(bid.mediaTypes.video.playerSize[1]); + videoObj.w = parseInt(bid.mediaTypes.video.playerSize[0], 10); + videoObj.h = parseInt(bid.mediaTypes.video.playerSize[1], 10); } if (bid.params.video.hasOwnProperty('skippable')) { videoObj.ext = {