Hi,

on -current LyX crashes at startup with "Abort trap" and writes
"backwards memcpy" into /var/log/messages.

Exchanging memcpy in src/support/gzstream.cpp helps.  (Tested with
manually applying the patches from ports to downloaded source on 7.5 and
newly sysupgraded snapshot.)  I successfully started LyX, created a
document, compiled, viewed and saved it.

My patch to gzstream.cpp below.

Best regards
Robert



--- src/support/gzstream.cpp.orig       Sun Aug 18 18:41:04 2024
+++ src/support/gzstream.cpp    Sun Aug 18 18:41:28 2024
@@ -32,7 +32,7 @@

 #include <iostream>
 #ifdef HAVE_STRING_H
-# include <string.h> // for memcpy
+# include <string.h> // for memmove
 #endif

 using namespace std;
@@ -92,7 +92,7 @@
     int n_putback = gptr() - eback();
     if ( n_putback > 4)
         n_putback = 4;
-    memcpy( buffer + (4 - n_putback), gptr() - n_putback, n_putback);
+    memmove( buffer + (4 - n_putback), gptr() - n_putback, n_putback);

     int num = gzread( file, buffer+4, bufferSize-4);
     if (num <= 0) // ERROR or EOF

Reply via email to