termux-packages/x11-packages/fltk/fltk-1.3.4_src_Fl_x.cxx.patch

16 lines
735 B
Diff

diff -uNr fltk-1.3.4/src/Fl_x.cxx fltk-1.3.4.mod/src/Fl_x.cxx
--- fltk-1.3.4/src/Fl_x.cxx 2016-10-14 19:35:44.000000000 +0300
+++ fltk-1.3.4.mod/src/Fl_x.cxx 2017-12-10 15:13:22.701039128 +0200
@@ -1481,9 +1481,9 @@
if (!fl_selection_requestor) return 0;
if (Fl::e_clipboard_type == Fl::clipboard_image) {
if (bytesread == 0) return 0;
- static char tmp_fname[21];
+ static char tmp_fname[52] = {0};
static Fl_Shared_Image *shared = 0;
- strcpy(tmp_fname, "/tmp/clipboardXXXXXX");
+ strcpy(tmp_fname, "/data/data/com.termux/files/usr/tmp/clipboardXXXXXX");
int fd = mkstemp(tmp_fname);
if (fd == -1) return 0;
uchar *p = sn_buffer; ssize_t towrite = bytesread, written;