mirror of
				https://github.com/SwallowOS/xorg_lib_libfontenc
				synced 2025-11-04 13:56:02 +08:00 
			
		
		
		
	Replace sprintf call with snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
		@@ -833,8 +833,8 @@ FontEncReallyReallyLoad(const char *charset,
 | 
			
		||||
 | 
			
		||||
    encoding = NULL;
 | 
			
		||||
    if (!format[0]) {
 | 
			
		||||
	sprintf(format, "%%%ds %%%d[^\n]\n", (int)sizeof(encoding_name) - 1,
 | 
			
		||||
		(int)sizeof(file_name) - 1);
 | 
			
		||||
	snprintf(format, sizeof(format), "%%%ds %%%d[^\n]\n",
 | 
			
		||||
                 (int)sizeof(encoding_name) - 1, (int)sizeof(file_name) - 1);
 | 
			
		||||
    }
 | 
			
		||||
    for(;;) {
 | 
			
		||||
        count = fscanf(file, format, encoding_name, file_name);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user