zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bf2b9adec5453019e74b5c6418573d171a837114

commit bf2b9adec5453019e74b5c6418573d171a837114
Author: Stefan Schmidt <[email protected]>
Date:   Wed Feb 12 12:10:04 2020 -0500

    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
---
 src/bin/exactness/player.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 @@
 #include "exactness_private.h"
 
 #define PATH_ 1024
+#define CMD_LINE_MAX 256
 #define IMAGE_FILENAME_EXT ".png"
 #define PAUSE_KEY_STR "F2"
 
@@ -1282,7 +1283,7 @@ int main(int argc, char **argv)
         /* Replace the current command line to hide the Exactness part */
         int len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[opt_args];
         memcpy(argv[0], argv[opt_args], len);
-        memset(argv[0] + len, 0, PATH_MAX - len);
+        memset(argv[0] + len, 0, CMD_LINE_MAX - len);
 
         int i;
         for (i = opt_args; i < argc; i++)

-- 


Reply via email to