After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 132814 - libxklavier-0.95 use strndup() ....
libxklavier-0.95 use strndup() ....
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
2.5.x
Other opensolaris
: High blocker
: ---
Assigned To: Sergey V. Udaltsov
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-01-28 22:45 UTC by Jonas Jonsson
Modified: 2005-08-15 01:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonas Jonsson 2004-01-28 22:45:50 UTC
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.
Comment 1 alexander.winston 2004-01-29 03:59:07 UTC
Adding the portability keyword and marking priority as high.
Comment 2 Mark McLoughlin 2004-02-06 07:32:38 UTC
GConf doesn't use libxklavier. Can't find a bugzilla home for
libxklavier, so moving to control-center which does use it.
Comment 3 Sergey V. Udaltsov 2004-02-06 08:24:52 UTC
0.95 is an old version. This problem was fixed in the latest version
already.