[MacPorts] #44279: screen 4.2.1_0 builds okay, but crashes with "Abort trap"

MacPorts noreply at macports.org
Mon Feb 2 04:25:13 PST 2015


#44279: screen 4.2.1_0 builds okay, but crashes with "Abort trap"
--------------------------------+--------------------------------
  Reporter:  alexander.coers@…  |      Owner:  macports-tickets@…
      Type:  defect             |     Status:  new
  Priority:  Normal             |  Milestone:
 Component:  ports              |    Version:  2.3.1
Resolution:                     |   Keywords:
      Port:  screen             |
--------------------------------+--------------------------------

Comment (by irgendetwas@…):

 This appears to be because the realpath function under osx 10.5.8 does not
 handle the second argument being NULL as per spec.

 in tty.c
 adding a buffer for realpath to work in and removing the free at the end
 allows screen to work properly under osx 10.5.8.

 now if someone who knows how to make the patches and fix the port files
 wants to correct this, it would be much appreciated :-)


 {{{
 int
 CheckTtyname (tty)
 char *tty;
 {
   struct stat st;
   char * real;
   char   realbuf[PATH_MAX]; //-------- buffer added
   int rc;

   real = realpath(tty, realbuf); //----------- NULL -> realbuf
   if (!real)
     return -1;

   if (lstat(real, &st) || !S_ISCHR(st.st_mode) ||
     (st.st_nlink > 1 && strncmp(real, "/dev/", 5)))
     rc = -1;
   else
     rc = 0;

   //free(real); //-------------- commented out
   return rc;
 }
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/44279#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list