Aha!  These gtkmorph crashes have been annoying me for years, but I
never made the connection to filename length until I encountered this
bug report.  I believe that was just the information I needed to fix the
problem.  From what I can tell, the bug lies in the show_fs() function
in gtkmorph/callbacks_fs.c, which hard-wires 50 characters for a file
name.  The 70+ characters in the bug report is a bit of a red herring;
that's probably just the point where the buffer overrun tickles some
critical data structure and brings down the whole application.

The solution is to replace

    char s[l+50];

with

    char s[l+strlen(N)+1];

I've attached a patch file.  Could the morph package maintainer please
test and apply it?

** Patch added: "Patch to prevent gtkmorph from crashing when manipulating long 
directory/file names"
   
https://bugs.launchpad.net/ubuntu/+source/xmorph/+bug/1066056/+attachment/5453619/+files/gtkmorph-filename-len.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1066056

Title:
  crashes when trying to load or save images or meshes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xmorph/+bug/1066056/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to