mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 02:35:28 +01:00
Use memcpy instead of strcpy. (#106988, Christian Biere)
2003-05-27 Matthias Clasen <maclas@gmx.de> * glib/gstrfuncs.c (g_strdup): Use memcpy instead of strcpy. (#106988, Christian Biere)
This commit is contained in:
parent
8d52393e7e
commit
c868c58694
@ -1,3 +1,8 @@
|
||||
2003-05-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
|
||||
strcpy. (#106988, Christian Biere)
|
||||
|
||||
2003-05-23 Noah Levitt <nlevitt@columbia.edu>
|
||||
|
||||
* glib/gutf8.c: Fix typo in UNICODE_VALID (related to #107427).
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-05-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
|
||||
strcpy. (#106988, Christian Biere)
|
||||
|
||||
2003-05-23 Noah Levitt <nlevitt@columbia.edu>
|
||||
|
||||
* glib/gutf8.c: Fix typo in UNICODE_VALID (related to #107427).
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-05-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
|
||||
strcpy. (#106988, Christian Biere)
|
||||
|
||||
2003-05-23 Noah Levitt <nlevitt@columbia.edu>
|
||||
|
||||
* glib/gutf8.c: Fix typo in UNICODE_VALID (related to #107427).
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-05-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
|
||||
strcpy. (#106988, Christian Biere)
|
||||
|
||||
2003-05-23 Noah Levitt <nlevitt@columbia.edu>
|
||||
|
||||
* glib/gutf8.c: Fix typo in UNICODE_VALID (related to #107427).
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-05-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
|
||||
strcpy. (#106988, Christian Biere)
|
||||
|
||||
2003-05-23 Noah Levitt <nlevitt@columbia.edu>
|
||||
|
||||
* glib/gutf8.c: Fix typo in UNICODE_VALID (related to #107427).
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-05-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gstrfuncs.c (g_strdup): Use memcpy instead of
|
||||
strcpy. (#106988, Christian Biere)
|
||||
|
||||
2003-05-23 Noah Levitt <nlevitt@columbia.edu>
|
||||
|
||||
* glib/gutf8.c: Fix typo in UNICODE_VALID (related to #107427).
|
||||
|
@ -83,11 +83,13 @@ gchar*
|
||||
g_strdup (const gchar *str)
|
||||
{
|
||||
gchar *new_str;
|
||||
gsize length;
|
||||
|
||||
if (str)
|
||||
{
|
||||
new_str = g_new (char, strlen (str) + 1);
|
||||
strcpy (new_str, str);
|
||||
length = strlen (str) + 1;
|
||||
new_str = g_new (char, length);
|
||||
memcpy (new_str, str, length);
|
||||
}
|
||||
else
|
||||
new_str = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user