diff options
| author | Stelios Tsampas <loathingkernel@gmail.com> | 2017-07-20 13:04:40 +0300 |
|---|---|---|
| committer | Stelios Tsampas <loathingkernel@gmail.com> | 2017-07-20 13:04:40 +0300 |
| commit | db51fade6de9461e7a139da2bf5887a9a6569506 (patch) | |
| tree | f43878331e9abfd4f214cf60a06162854e4b75b3 /plugins/dfinput/xkb.c | |
| parent | b6129143f75cf4480883e467d52627de949466fb (diff) | |
| download | pcsxr-db51fade6de9461e7a139da2bf5887a9a6569506.tar.gz | |
* dfinput: Fix possible buffer overflows in the ui.
Diffstat (limited to 'plugins/dfinput/xkb.c')
| -rwxr-xr-x | plugins/dfinput/xkb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/dfinput/xkb.c b/plugins/dfinput/xkb.c index 53fb90d4..47eac669 100755 --- a/plugins/dfinput/xkb.c +++ b/plugins/dfinput/xkb.c @@ -46,7 +46,7 @@ void InitKeyboard() { resumeScrSaver = 0; if (g.cfg.PreventScrSaver) { char buf[64]; - snprintf(buf, 64, "xdg-screensaver suspend 0x%x > /dev/null 2>&1", window); + snprintf(buf, sizeof(buf), "xdg-screensaver suspend 0x%x > /dev/null 2>&1", window); if (pclose(popen(buf, "r")) == 0) { resumeScrSaver = 1; printf("Suspending Window ID 0x%x of activating screensaver.\n", window); @@ -79,7 +79,7 @@ void DestroyKeyboard() { if (resumeScrSaver) { char buf[64]; printf("Resuming Window ID 0x%x to activate screensaver.\n", window); - snprintf(buf, 64, "xdg-screensaver resume 0x%x", window); + snprintf(buf, sizeof(buf), "xdg-screensaver resume 0x%x", window); FILE *phandle = popen(buf, "r"); pclose(phandle); } |
