diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-09-21 14:18:02 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-09-21 14:18:13 +0300 |
commit | 963c98a65e4eddf179e170ff0bb30e4bfafc6b16 (patch) | |
tree | 5835a74aec467023e39686337ce9a70546e54efc /sal | |
parent | WaE: format (64-bit) (diff) | |
download | core-963c98a65e4eddf179e170ff0bb30e4bfafc6b16.tar.gz core-963c98a65e4eddf179e170ff0bb30e4bfafc6b16.zip |
Guard against lack of slashes in dli_fname
Change-Id: Id9c452d9c1034f2e7969a9eae7588f2eb81a8813
Diffstat (limited to 'sal')
-rw-r--r-- | sal/android/lo-bootstrap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c index 07f6a277e07a..f1498695395f 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; } |