[Libreoffice-commits] .: sal/android
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 21 04:20:27 PDT 2012
sal/android/lo-bootstrap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 963c98a65e4eddf179e170ff0bb30e4bfafc6b16
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Sep 21 14:18:02 2012 +0300
Guard against lack of slashes in dli_fname
Change-Id: Id9c452d9c1034f2e7969a9eae7588f2eb81a8813
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index 07f6a27..f149869 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1603,7 +1603,10 @@ Java_org_libreoffice_android_Bootstrap_setCommandArgs(JNIEnv* env,
if (slash != NULL)
*slash = '\0';
slash = strrchr(new_argv0, '/');
- strcpy(slash+1, c_argv[0]);
+ if (slash != NULL)
+ strcpy(slash+1, c_argv[0]);
+ else
+ strcpy(new_argv0, c_argv[0]);
free(c_argv[0]);
c_argv[0] = new_argv0;
}
More information about the Libreoffice-commits
mailing list