diff --git a/app/src/main/cpp/native-lib.cpp b/app/src/main/cpp/native-lib.cpp index db3ba02..0705985 100644 --- a/app/src/main/cpp/native-lib.cpp +++ b/app/src/main/cpp/native-lib.cpp @@ -25,7 +25,10 @@ void *my_dlopen(const char *filename, int flags) } static void send_string(int fd, const char *str) { - int len = strlen(str); + int len = 0; + if (str) { + len = strlen(str); + } write(fd, &len, sizeof(len)); write(fd, str, len); }