ALT Linux Bugzilla
– Attachment 3739 Details for
Bug 21061
Crashes right from the start
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Use memcpy() instead of strcpy()
0001-string.c-NewStrString-replace-strcpy-to-memcpy.patch (text/plain), 765 bytes, created by
Slava Semushin
on 2009-08-15 11:43:12 MSD
(
hide
)
Description:
Use memcpy() instead of strcpy()
Filename:
MIME Type:
Creator:
Slava Semushin
Created:
2009-08-15 11:43:12 MSD
Size:
765 bytes
patch
obsolete
>From 76dd17a840835a3130f2f61f00f29261f2f2386c Mon Sep 17 00:00:00 2001 >From: Slava Semushin <php-coder@altlinux.ru> >Date: Sat, 15 Aug 2009 14:37:01 +0700 >Subject: [PATCH] string.c(NewStrString): replace strcpy() to memcpy(). > >Fixed segfault at start. > >See for details: https://bugzilla.altlinux.org/21061 >--- > nickle/string.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/nickle/string.c b/nickle/string.c >index ae3e381..d900265 100644 >--- a/nickle/string.c >+++ b/nickle/string.c >@@ -246,7 +246,7 @@ NewStrString (const char *str) > Value ret; > > ret = NewString (strlen (str)); >- strcpy (StringChars (&ret->string), str); >+ memcpy(StringChars(&ret->string), str, ret->string.length); > RETURN (ret); > } > >-- >1.6.3.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 21061
: 3739