File arj-3.10.22-mageia-fix_format_string.patch of Package arj
Index: arj_arcv.c
===================================================================
--- arj_arcv.c
+++ arj_arcv.c 2009-03-07 02:02:13.000000000 +0100
@@ -3652,7 +3652,7 @@
{
if(msg_fprintf(idxstream, M_TESTING, archive_name)<0)
error(M_DISK_FULL);
- if(fprintf(idxstream, lf)<0)
+ if(fprintf(idxstream, "%s", lf)<0)
error(M_DISK_FULL);
}
cmd_verb=ARJ_CMD_TEST;
Index: arj_user.c
===================================================================
--- arj_user.c
+++ arj_user.c 2009-03-07 02:09:18.000000000 +0100
@@ -1059,7 +1059,7 @@
if(recover_file(tmp_archive_name, nullstr, tmp_tmp_filename, protected, eof_pos))
{
msg_cprintf(H_HL, M_CANT_FIND_DAMAGE, archive_name);
- printf(lf);
+ printf("%s", lf);
}
else
{
@@ -1294,7 +1294,7 @@
if(recover_file(archive_name, nullstr, nullstr, protected, eof_pos))
{
msg_cprintf(H_HL, M_CANT_FIND_DAMAGE, archive_name);
- printf(lf);
+ printf("%s", lf);
}
else
{
@@ -2303,7 +2303,7 @@
timestamp_to_str(timetext, &ftime_stamp);
msg_cprintf(H_HL|H_NFMT, M_ARCHIVE_CREATED, timetext);
if(show_ansi_comments)
- printf(cmt_ptr);
+ printf("%s", cmt_ptr);
else
display_comment(cmt_ptr);
/* The sfx_setup() occurs here */
Index: arjsfx.c
===================================================================
--- arjsfx.c
+++ arjsfx.c 2009-03-07 02:03:39.000000000 +0100
@@ -214,7 +214,7 @@
freopen(dev_con, m_w, stdout);
#if SFX_LEVEL>=ARJSFXV
if(ferror(stdout))
- msg_fprintf(stderr, M_DISK_FULL);
+ msg_fprintf(stderr, "%s", M_DISK_FULL);
if(debug_enabled&&strchr(debug_opt, 't')!=NULL)
{
ticks=get_ticks()-ticks;
Index: fardata.c
===================================================================
--- fardata.c
+++ fardata.c 2009-03-07 01:59:37.000000000 +0100
@@ -397,7 +397,7 @@
textcolor(color_table[ccode&H_COLORMASK].color);
#else
printf(strform, n_text);
- printf(lf);
+ printf("%s",lf);
#endif
n_text=t_text+1;
#if SFX_LEVEL>=ARJ
Index: rearj.c
===================================================================
--- rearj.c
+++ rearj.c 2009-03-07 02:13:41.000000000 +0100
@@ -935,7 +935,7 @@
msg_cprintf(H_HL|H_NFMT, M_OLD_SIZE, old_fsize);
msg_cprintf(H_HL|H_NFMT, M_NEW_SIZE, new_fsize);
msg_cprintf(H_HL|H_NFMT, M_SAVINGS_SIZE, gain);
- printf(lf);
+ printf("%s", lf);
total_old_fsize+=old_fsize;
total_new_fsize+=new_fsize;
total_files++;
Index: register.c
===================================================================
--- register.c
+++ register.c 2009-03-07 02:16:55.000000000 +0100
@@ -205,7 +205,7 @@
char reg_source[200];
int i;
- printf(M_REGISTER_BANNER);
+ printf("%s", M_REGISTER_BANNER);
integrity_pattern[0]--;
build_crc32_table();
if(argc!=2)
Index: arjdisp.c
===================================================================
--- arjdisp.c
+++ arjdisp.c 2009-03-07 02:29:15.000000000 +0100
@@ -54,19 +54,19 @@
textcolor(7);
clrscr();
gotoxy(2, 2);
- scrprintf(win_top);
+ scrprintf("%s", win_top);
for(i=3; i<24; i++)
{
- gotoxy(2, i); scrprintf(win_border);
- gotoxy(79, i); scrprintf(win_border);
+ gotoxy(2, i); scrprintf("%s", win_border);
+ gotoxy(79, i); scrprintf("%s", win_border);
}
- gotoxy(2, 24); scrprintf(win_bottom);
+ gotoxy(2, 24); scrprintf("%s", win_bottom);
gotoxy(10, 5);
- scrprintf(M_ARJDISP_COPYRIGHT);
+ scrprintf("%s", M_ARJDISP_COPYRIGHT);
gotoxy(10, 6);
- scrprintf(M_ARJDISP_DISTRIBUTION);
+ scrprintf("%s", M_ARJDISP_DISTRIBUTION);
gotoxy(10, 7);
- scrprintf(M_ARJDISP_LICENSE);
+ scrprintf("%s", M_ARJDISP_LICENSE);
gotoxy(16, 10);
scrprintf(M_PROCESSING_ARCHIVE, archive_name);
t=strtok(M_ARJDISP_INFO, msg_lf);
@@ -78,7 +78,7 @@
t=strtok(NULL, msg_lf);
}
gotoxy(16, 20);
- scrprintf(M_PRESS_ANY_KEY);
+ scrprintf("%s", M_PRESS_ANY_KEY);
uni_getch();
gotoxy(1, 24);
}
@@ -96,19 +96,19 @@
{
clrscr();
gotoxy(2, 2);
- scrprintf(win_top);
+ scrprintf("%s", win_top);
for(i=3; i<24; i++)
{
- gotoxy(2, i); scrprintf(win_border);
- gotoxy(79, i); scrprintf(win_border);
+ gotoxy(2, i); scrprintf("%s", win_border);
+ gotoxy(79, i); scrprintf("%s", win_border);
}
- gotoxy(2, 24); scrprintf(win_bottom);
+ gotoxy(2, 24); scrprintf("%s", win_bottom);
gotoxy(10, 5);
- scrprintf(M_ARJDISP_COPYRIGHT);
+ scrprintf("%s", M_ARJDISP_COPYRIGHT);
gotoxy(10, 6);
- scrprintf(M_ARJDISP_DISTRIBUTION);
+ scrprintf("%s", M_ARJDISP_DISTRIBUTION);
gotoxy(10, 7);
- scrprintf(M_ARJDISP_LICENSE);
+ scrprintf("%s", M_ARJDISP_LICENSE);
gotoxy(16, 10);
scrprintf(M_PROCESSING_ARCHIVE, archive_name);
gotoxy(16, 12);
@@ -132,13 +132,13 @@
break;
}
gotoxy(15, 14);
- scrprintf(ind_top);
+ scrprintf("%s", ind_top);
gotoxy(15, 15);
- scrprintf(ind_middle);
+ scrprintf("%s", ind_middle);
gotoxy(15, 16);
- scrprintf(ind_bottom);
+ scrprintf("%s", ind_bottom);
gotoxy(16, 18);
- scrprintf(M_ARJDISP_CTR_START);
+ scrprintf("%s", M_ARJDISP_CTR_START);
}
else
{
@@ -165,19 +165,19 @@
textcolor(7);
clrscr();
gotoxy(2, 2);
- scrprintf(win_top);
+ scrprintf("%s", win_top);
for(i=3; i<24; i++)
{
- gotoxy(2, i); scrprintf(win_border);
- gotoxy(79, i); scrprintf(win_border);
+ gotoxy(2, i); scrprintf("%s", win_border);
+ gotoxy(79, i); scrprintf("%s", win_border);
}
- gotoxy(2, 24); scrprintf(win_bottom);
+ gotoxy(2, 24); scrprintf("%s", win_bottom);
gotoxy(10, 5);
- scrprintf(M_ARJDISP_COPYRIGHT);
+ scrprintf("%s", M_ARJDISP_COPYRIGHT);
gotoxy(10, 6);
- scrprintf(M_ARJDISP_DISTRIBUTION);
+ scrprintf("%s", M_ARJDISP_DISTRIBUTION);
gotoxy(10, 7);
- scrprintf(M_ARJDISP_LICENSE);
+ scrprintf("%s", M_ARJDISP_LICENSE);
gotoxy(16, 10);
scrprintf(M_FINISHED_PROCESSING, archive_name);
gotoxy(1, 24);
Index: arjdisp.c
===================================================================
--- arjdisp.c
+++ arjdisp.c 2009-03-07 02:32:17.000000000 +0100
@@ -146,7 +146,7 @@
gotoxy(16, 15);
memset(progress, indo, i);
progress[i]='\0';
- scrprintf(progress);
+ scrprintf("%s", progress);
gotoxy(16, 18);
scrprintf(M_ARJDISP_CTR, calc_percentage(bytes, uncompsize)/10);
}