]> git.pld-linux.org Git - packages/quake3.git/blob - quake3-strcpy-abuse.patch
d741ab2752b6f2779821ae34a5dad23d98e51b2e
[packages/quake3.git] / quake3-strcpy-abuse.patch
1 --- quake3-1.36/code/botlib/l_precomp.c 2009-04-27 08:42:37.000000000 +0200
2 +++ quake3-1.36/code/botlib/l_precomp.c~        2009-11-03 21:03:08.000000000 +0100
3 @@ -948,7 +948,7 @@ void PC_ConvertPath(char *path)
4                 if ((*ptr == '\\' || *ptr == '/') &&
5                                 (*(ptr+1) == '\\' || *(ptr+1) == '/'))
6                 {
7 -                       strcpy(ptr, ptr+1);
8 +                       memmove(ptr, ptr+1, strlen(ptr));
9                 } //end if
10                 else
11                 {
12 --- quake3-1.36/code/botlib/l_script.c  2009-04-27 08:42:37.000000000 +0200
13 +++ quake3-1.36/code/botlib/l_script.c~ 2009-11-03 21:06:11.000000000 +0100
14 @@ -1118,7 +1118,7 @@ void StripDoubleQuotes(char *string)
15  {
16         if (*string == '\"')
17         {
18 -               strcpy(string, string+1);
19 +               memmove(string, string+1, strlen(string));
20         } //end if
21         if (string[strlen(string)-1] == '\"')
22         {
23 @@ -1135,7 +1135,7 @@ void StripSingleQuotes(char *string)
24  {
25         if (*string == '\'')
26         {
27 -               strcpy(string, string+1);
28 +               memmove(string, string+1, strlen(string));
29         } //end if
30         if (string[strlen(string)-1] == '\'')
31         {
This page took 0.125943 seconds and 2 git commands to generate.