Merge pull request #4395 from akallabeth/afreerdp_clipboard_fix
[aFreeRDP] Check length of string returned by ClipboardGetData
This commit is contained in:
commit
71bd654fd2
@ -435,6 +435,7 @@ static UINT android_cliprdr_server_format_data_response(
|
||||
formatId = ClipboardRegisterFormat(afc->clipboard, "UTF8_STRING");
|
||||
data = (void*) ClipboardGetData(afc->clipboard, formatId, &size);
|
||||
attached = jni_attach_thread(&env);
|
||||
size = strnlen(data, size);
|
||||
jdata = jniNewStringUTF(env, data, size);
|
||||
freerdp_callback("OnRemoteClipboardChanged", "(JLjava/lang/String;)V", (jlong)instance,
|
||||
jdata);
|
||||
|
Loading…
Reference in New Issue
Block a user