File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1883,7 +1883,7 @@ static void DBUGOpenFile(CODE_STATE *cs,
1883
1883
cs -> stack -> name [len ]= 0 ;
1884
1884
}
1885
1885
else
1886
- strmov (cs -> stack -> name ,name );
1886
+ strmov (cs -> stack -> name ,name );
1887
1887
name = cs -> stack -> name ;
1888
1888
if (strcmp (name , "-" ) == 0 )
1889
1889
{
Original file line number Diff line number Diff line change @@ -73,11 +73,13 @@ extern void *(*my_str_malloc)(size_t);
73
73
extern void * (* my_str_realloc )(void * , size_t );
74
74
extern void (* my_str_free )(void * );
75
75
76
+ #ifdef DBUG_OFF
76
77
#if defined(HAVE_STPCPY ) && MY_GNUC_PREREQ (3 , 4 ) && !defined(__INTEL_COMPILER )
77
78
#define strmov (A ,B ) __builtin_stpcpy((A),(B))
78
79
#elif defined(HAVE_STPCPY )
79
80
#define strmov (A ,B ) stpcpy((A),(B))
80
81
#endif
82
+ #endif
81
83
82
84
/* Declared in int2str() */
83
85
extern const char _dig_vec_upper [];
Original file line number Diff line number Diff line change 40
40
41
41
char * strmov (register char * dst , register const char * src )
42
42
{
43
+ DBUG_ASSERT (src + strlen (src ) < dst || dst + strlen (src ) < src );
43
44
while ((* dst ++ = * src ++ )) ;
44
45
return dst - 1 ;
45
46
}
You can’t perform that action at this time.
0 commit comments