tests/ecore: unset app args after app args unit test to prevent invalid reads

Summary:
various internal components in efl access the app args and read them which
will result in invalid memory access since these are stack-allocated strings
Depends on D10412

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10413
This commit is contained in:
Mike Blumenkrantz 2019-10-24 18:23:03 +02:00 committed by Xavi Artigas
parent f5e9af8c67
commit e05311a99a
1 changed files with 7 additions and 0 deletions

View File

@ -461,9 +461,16 @@ EFL_START_TEST(ecore_test_ecore_app)
int argc_out = 0;
char **argv_out = NULL;
int pargc;
char **pargv;
ecore_app_args_get(&pargc, &pargv);
ecore_app_args_set(argc_in, argv_in);
ecore_app_args_get(&argc_out, &argv_out);
ecore_app_args_set(pargc, (const char**)pargv);
fail_if(argc_in != argc_out);
int i;
for (i = 0; i < argc_out; i++)