mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	get rid of strcat
* regerror.c (onig_vsnprintf_with_pattern): use memcpy with the known length instead of strcat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									79c50a77ff
								
							
						
					
					
						commit
						6d8574ade1
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -324,7 +324,8 @@ onig_vsnprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
 | 
			
		|||
  need = (pat_end - pat) * 4 + 4;
 | 
			
		||||
 | 
			
		||||
  if (n + need < (size_t )bufsize) {
 | 
			
		||||
    xstrcat((char* )buf, ": /", bufsize);
 | 
			
		||||
    static const char sep[] = ": /";
 | 
			
		||||
    memcpy((char* )buf + n, sep, sizeof(sep));
 | 
			
		||||
    s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf);
 | 
			
		||||
 | 
			
		||||
    p = pat;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue