mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
Merge pull request #1076 from mattias-symphony/SDA-2465
fix: SDA-2465 Clamping the display id to ensure we are not accessing outside the array
This commit is contained in:
commit
ced1c6b3da
@ -803,10 +803,12 @@ export class WindowHandler {
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ source.display_id ]);
|
||||
} else {
|
||||
const dispId = source.id.split(':')[1];
|
||||
const clampedDispId = Math.min(dispId, displays.length - 1);
|
||||
const keyId = 'id';
|
||||
logger.info('window-utils: dispId: ' + dispId);
|
||||
logger.info('window-utils: displays [' + dispId + '] [id]: ' + displays [dispId] [ keyId ]);
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ displays [dispId] [ keyId ].toString() ]);
|
||||
logger.info('window-utils: clampedDispId: ' + clampedDispId);
|
||||
logger.info('window-utils: displays [' + clampedDispId + '] [id]: ' + displays [clampedDispId] [ keyId ]);
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ displays [clampedDispId] [ keyId ].toString() ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user