[Bug 132814] New - libxklavier-0.95 use strndup() ....



http://bugzilla.gnome.org/show_bug.cgi?id=132814

           Summary: libxklavier-0.95 use strndup() ....
           Product: GConf
           Version: CVS HEAD
                OS: SunOS
        OS Details: SunOS brusen 5.9 Generic_112234-11 i86pc i386 i86pc
            Status: NEW
 Status Whiteboard:
          Keywords: GNOMEVER2.5
        Resolution:
          Severity: blocker
          Priority: Normal
         Component: gconf
        AssignedTo: hp redhat com
        ReportedBy: koffle bredband net


GConf use libxklavier-0.95.  In the xklavier_config.c file, on line 340 and
346, strndup() is used.  Bad idea.

strndup doesn't exist on Solaris.

Use memcpy() instead, when malloc() have created sufficient memory.

Or something _like_:

#ifdef __sun__
char *strndup(char *s1, char *s2, int len)
{
  char *tmp = malloc(len*sizeof(char));
  tmp = memcpy(s1, s2, len);
  return tmp;
}
#endif

in the beginning of the file.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]