dtudcfonted: Resolve further coverity issues
This commit is contained in:
@@ -42,8 +42,8 @@
|
||||
#define FONT_FILE_PARM 0
|
||||
|
||||
#define COMM_SNF_POPEN( permission, snf_file, out_file, ep, buf, command ) { \
|
||||
strcpy( (buf), " -i " ) ; \
|
||||
sprintf( (command), "%s %s > %s", bdftosnf, (buf), (out_file) ); \
|
||||
snprintf( (buf), sizeof((buf)), " -i " ) ; \
|
||||
snprintf( (command), sizeof((command)), "%s %s > %s", bdftosnf, (buf), (out_file) ); \
|
||||
}
|
||||
#define COMM_SNF_FILEVERSION( snf_fd, finf, buf, permission ) { \
|
||||
read( (snf_fd), (buf), sizeof(FontInfoRec) ); \
|
||||
@@ -142,7 +142,7 @@
|
||||
#define COMM_SETSTYLE_TO_FONTDATA( style, key, mask ) { \
|
||||
if( style ) { \
|
||||
char stylebuf[ BUFSIZE ] ; \
|
||||
strcpy( stylebuf, style ) ; \
|
||||
snprintf( stylebuf, sizeof(stylebuf), "%s", style ) ; \
|
||||
key.style.name = stylebuf ; \
|
||||
mask |= FAL_FONT_MASK_STYLE_NAME ; \
|
||||
} \
|
||||
@@ -244,13 +244,13 @@
|
||||
}\
|
||||
} \
|
||||
if ( ( (srch_path) = getenv( DTUDCFONTS ) ) == NULL ) { \
|
||||
sprintf( (list_d), "%s/%s", DTUDCFONTSLISTDIR, (list_file) ); \
|
||||
sprintf( (list_c), "%s/C/%s", DTUDCFONTSLISTDIR, (list_file) ); \
|
||||
sprintf( (list_l), "%s/%s/%s", DTUDCFONTSLISTDIR, (locale), (list_file) ); \
|
||||
snprintf( (list_d), sizeof(list_d), "%s/%s", DTUDCFONTSLISTDIR, (list_file) ); \
|
||||
snprintf( (list_c), sizeof(list_c), "%s/C/%s", DTUDCFONTSLISTDIR, (list_file) ); \
|
||||
snprintf( (list_l), sizeof(list_l), "%s/%s/%s", DTUDCFONTSLISTDIR, (locale), (list_file) ); \
|
||||
} else { \
|
||||
sprintf( (list_d), "%s/%s", (srch_path), (list_file) ); \
|
||||
sprintf( (list_c), "%s/C/%s", (srch_path), (list_file) ); \
|
||||
sprintf( (list_l), "%s/%s/%s", (srch_path), (locale), (list_file) ); \
|
||||
snprintf( (list_d), sizeof(list_d), "%s/%s", (srch_path), (list_file) ); \
|
||||
snprintf( (list_c), sizeof(list_c), "%s/C/%s", (srch_path), (list_file) ); \
|
||||
snprintf( (list_l), sizeof(list_l), "%s/%s/%s", (srch_path), (locale), (list_file) ); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ static char *udc_font_sp ;
|
||||
}
|
||||
|
||||
#define GETXLFDELMSTR( sp, xlfdname, elm_num ) { \
|
||||
strcpy( udc_font_str_buffer, (xlfdname) ) ; \
|
||||
snprintf( udc_font_str_buffer, sizeof(udc_font_str_buffer), "%s", (xlfdname) ) ; \
|
||||
udc_font_sp = udc_font_str_buffer ; \
|
||||
udc_font_elm_cnt = 0 ;\
|
||||
while(*udc_font_sp){\
|
||||
@@ -137,7 +137,7 @@ static char *udc_font_sp ;
|
||||
}
|
||||
|
||||
#define GETCHARSETSTR( char_set, xlfdname ) { \
|
||||
strcpy( udc_font_str_buffer, (xlfdname) ) ; \
|
||||
snprintf( udc_font_str_buffer, sizeof(udc_font_str_buffer), "%s", (xlfdname) ) ; \
|
||||
POINTXLFDELM( (char_set), udc_font_str_buffer, XLFD_ELM_CHARSET_REGISTRY ) ; \
|
||||
(char_set)++ ; \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user