efl/src/bin/exactness
Marcel Hollerbach 66e2d71414 exactness: handbuild a new argv array instead of reassemling the new one
this commit removes the code that was changing argv values, and replaces
it with a new array. Which is absolutly fine, as the argv / argc values
are never accessed later on. Only the copies that have been passed to
efl_main or elm_main.

This resolves several issues:
1. the for loop is useless, every single array element that gets
   initialized with it, is some offset from argv[0] this may also crash
   when argv[i] - argv[opt_args] is bigger strlen argv[0].
2. The memcpy here is super dangerous, the dest array is not garanteed
   to have the same size as argv[0], this only works if the client
   application name is shorter than the name "exactness_recorder"
3. The memset here is absolutly wrong. There is again no garantee that
   the array has the expected size behind that, this was constantly
   overwriting the segment after the place where argv was stored, which
   was lukely enough on fedora always the environs, which deleted the
   couple first segments. (This was not causing any fuzz, since they
   have been sudo related env vars on the docker image). However, on
   arch this just crashed right away. On Ubuntu this overwrote DISPLAY,
   which resulted in the unability to launch the app.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11600
2020-03-25 22:12:56 +01:00
..
.gitignore exactness: import code from external repo into efl.git 2020-02-07 11:31:13 +01:00
common.c exactness: switch from homegrown debug printf to eina_log 2020-03-24 12:24:07 +01:00
common.h exactness: switch from homegrown debug printf to eina_log 2020-03-24 12:24:07 +01:00
exactness.c exactness: switch from homegrown debug printf to eina_log 2020-03-24 12:24:07 +01:00
injector.c exactness: switch from homegrown debug printf to eina_log 2020-03-24 12:24:07 +01:00
inspect.c exactness: remove exactness library and move code into binary folder 2020-03-24 12:24:04 +01:00
meson.build exactness: remove exactness library and move code into binary folder 2020-03-24 12:24:04 +01:00
player.c exactness: handbuild a new argv array instead of reassemling the new one 2020-03-25 22:12:56 +01:00
player_entry.edc exactness: remove unused code 2020-02-07 11:31:21 +01:00
recorder.c exactness: handbuild a new argv array instead of reassemling the new one 2020-03-25 22:12:56 +01:00