summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-02-12 12:10:04 -0500
committerMike Blumenkrantz <zmike@samsung.com>2020-02-12 12:10:04 -0500
commitbf2b9adec5453019e74b5c6418573d171a837114 (patch)
tree4b09919d045603404418b29c436a3c555edb234e /src/bin
parent9510702ede61e95e8d5e2776f8178c742ece3d04 (diff)
exactness_player: fix running of exactness player after compile fix
Summary: The last compile fix broke the execution of exactness. When replacing _POSIX_PATH_MAX with PATH_MAX here we did not catch that it would overwrite out of bounds here as the original _POSIX_PATH_MAX is limited to 256 while PATH_MAX can go up to 4096. This screws up the size of the memset. Reviewers: zmike, bu5hm4n, vtorri, ali.alzyod Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11317
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/exactness/player.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c
index 411b1a64cb..13de9bffe3 100644
--- a/src/bin/exactness/player.c
+++ b/src/bin/exactness/player.c
@@ -32,6 +32,7 @@
32#include "exactness_private.h" 32#include "exactness_private.h"
33 33
34#define PATH_ 1024 34#define PATH_ 1024
35#define CMD_LINE_MAX 256
35#define IMAGE_FILENAME_EXT ".png" 36#define IMAGE_FILENAME_EXT ".png"
36#define PAUSE_KEY_STR "F2" 37#define PAUSE_KEY_STR "F2"
37 38
@@ -1282,7 +1283,7 @@ int main(int argc, char **argv)
1282 /* Replace the current command line to hide the Exactness part */ 1283 /* Replace the current command line to hide the Exactness part */
1283 int len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[opt_args]; 1284 int len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[opt_args];
1284 memcpy(argv[0], argv[opt_args], len); 1285 memcpy(argv[0], argv[opt_args], len);
1285 memset(argv[0] + len, 0, PATH_MAX - len); 1286 memset(argv[0] + len, 0, CMD_LINE_MAX - len);
1286 1287
1287 int i; 1288 int i;
1288 for (i = opt_args; i < argc; i++) 1289 for (i = opt_args; i < argc; i++)