summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-24 18:23:03 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-10-24 18:23:03 +0200
commite05311a99a215800b08a815067750aeb241b4c55 (patch)
treebde6af7edf59b006a290b1563326bd84f11ae929 /src/tests/ecore/ecore_test_ecore.c
parentf5e9af8c674e6c2c9771498309d78422b54f48ed (diff)
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
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index 6439bc32d2..66544d0f98 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -461,9 +461,16 @@ EFL_START_TEST(ecore_test_ecore_app)
461 int argc_out = 0; 461 int argc_out = 0;
462 char **argv_out = NULL; 462 char **argv_out = NULL;
463 463
464 int pargc;
465 char **pargv;
466
467 ecore_app_args_get(&pargc, &pargv);
468
464 ecore_app_args_set(argc_in, argv_in); 469 ecore_app_args_set(argc_in, argv_in);
465 ecore_app_args_get(&argc_out, &argv_out); 470 ecore_app_args_get(&argc_out, &argv_out);
466 471
472 ecore_app_args_set(pargc, (const char**)pargv);
473
467 fail_if(argc_in != argc_out); 474 fail_if(argc_in != argc_out);
468 int i; 475 int i;
469 for (i = 0; i < argc_out; i++) 476 for (i = 0; i < argc_out; i++)