* src/android.c (sendDndUri, sendDndText): Verify that allocated
string memory is non-nil before writing to it.
length = (*env)->GetStringLength (env, string);
buffer = malloc (length * sizeof *buffer);
+
+ /* Out of memory. */
+ if (!buffer)
+ return 0;
+
characters = (*env)->GetStringChars (env, string, NULL);
if (!characters)
length = (*env)->GetStringLength (env, string);
buffer = malloc (length * sizeof *buffer);
+
+ /* Out of memory. */
+ if (!buffer)
+ return 0;
+
characters = (*env)->GetStringChars (env, string, NULL);
if (!characters)