Prefer strcpy(3) to strlcpy(3) when either works
* lib/gshadow.c (sgetsgent): Use strcpy(3) not strlcpy(3), since the string is known to fit. Signed-off-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Alejandro Colomar <alx@kernel.org> Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
		
				
					committed by
					
						 Iker Pedrosa
						Iker Pedrosa
					
				
			
			
				
	
			
			
			
						parent
						
							a926a26f0c
						
					
				
				
					commit
					ea3d49506f
				
			| @@ -128,7 +128,7 @@ void endsgent (void) | ||||
| 		sgrbuflen = len; | ||||
| 	} | ||||
|  | ||||
| 	strlcpy (sgrbuf, string, len); | ||||
| 	strcpy (sgrbuf, string); | ||||
|  | ||||
| 	cp = strrchr (sgrbuf, '\n'); | ||||
| 	if (NULL != cp) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user