Avoid memory collision.
authorRomain Forlot <romain.forlot@iot.bzh>
Mon, 4 Dec 2017 16:35:21 +0000 (17:35 +0100)
committerRomain Forlot <romain.forlot@iot.bzh>
Fri, 8 Dec 2017 19:15:53 +0000 (20:15 +0100)
Change-Id: I805a725d6b9477fcb690d7c2c7cbb6bb4f112dfb
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
filescan-utils.c

index 37cc2b3..a20179c 100644 (file)
@@ -120,7 +120,7 @@ PUBLIC const char *GetBinderName() {
 
     binderName= getenv("AFB_BINDER_NAME");
     if (!binderName) {
-        char psName[17];
+        static char psName[17];
         // retrieve binder name from process name afb-name-trailer
         prctl(PR_GET_NAME, psName,NULL,NULL,NULL);
         binderName=(char*)GetMidleName(psName);