]> git.pld-linux.org Git - packages/arj.git/blob - arj-format-security.patch
Add patch to fix build with -Werror=format-security
[packages/arj.git] / arj-format-security.patch
1 diff -urN arj-3.10.22/arj_arcv.c arj-3.10.22.ne/arj_arcv.c
2 --- arj-3.10.22/arj_arcv.c      2005-06-21 21:53:12.000000000 +0200
3 +++ arj-3.10.22.ne/arj_arcv.c   2013-01-30 16:34:20.288567626 +0100
4 @@ -3652,7 +3652,7 @@
5   {
6    if(msg_fprintf(idxstream, M_TESTING, archive_name)<0)
7     error(M_DISK_FULL);
8 -  if(fprintf(idxstream, lf)<0)
9 +  if(fprintf(idxstream, "%s", lf)<0)
10     error(M_DISK_FULL);
11   }
12   cmd_verb=ARJ_CMD_TEST;
13 diff -urN arj-3.10.22/arjdisp.c arj-3.10.22.ne/arjdisp.c
14 --- arj-3.10.22/arjdisp.c       2003-06-22 13:12:28.000000000 +0200
15 +++ arj-3.10.22.ne/arjdisp.c    2013-01-30 16:54:51.568563877 +0100
16 @@ -54,19 +54,19 @@
17   textcolor(7);
18   clrscr();
19   gotoxy(2, 2);
20 - scrprintf(win_top);
21 + scrprintf("%s", win_top);
22   for(i=3; i<24; i++)
23   {
24 -  gotoxy(2, i); scrprintf(win_border);
25 -  gotoxy(79, i); scrprintf(win_border);
26 +  gotoxy(2, i); scrprintf("%s", win_border);
27 +  gotoxy(79, i); scrprintf("%s", win_border);
28   }
29 - gotoxy(2, 24); scrprintf(win_bottom);
30 + gotoxy(2, 24); scrprintf("%s", win_bottom);
31   gotoxy(10, 5);
32 - scrprintf(M_ARJDISP_COPYRIGHT);
33 + scrprintf("%s", M_ARJDISP_COPYRIGHT);
34   gotoxy(10, 6);
35 - scrprintf(M_ARJDISP_DISTRIBUTION);
36 + scrprintf("%s", M_ARJDISP_DISTRIBUTION);
37   gotoxy(10, 7);
38 - scrprintf(M_ARJDISP_LICENSE);
39 + scrprintf("%s", M_ARJDISP_LICENSE);
40   gotoxy(16, 10);
41   scrprintf(M_PROCESSING_ARCHIVE, archive_name);
42   t=strtok(M_ARJDISP_INFO, msg_lf);
43 @@ -78,7 +78,7 @@
44    t=strtok(NULL, msg_lf);
45   }
46   gotoxy(16, 20);
47 - scrprintf(M_PRESS_ANY_KEY);
48 + scrprintf("%s", M_PRESS_ANY_KEY);
49   uni_getch();
50   gotoxy(1, 24);
51  }
52 @@ -96,19 +96,19 @@
53   {
54    clrscr();
55    gotoxy(2, 2);
56 -  scrprintf(win_top);
57 +  scrprintf("%s", win_top);
58    for(i=3; i<24; i++)
59    {
60 -   gotoxy(2, i); scrprintf(win_border);
61 -   gotoxy(79, i); scrprintf(win_border);
62 +   gotoxy(2, i); scrprintf("%s", win_border);
63 +   gotoxy(79, i); scrprintf("%s", win_border);
64    }
65 -  gotoxy(2, 24); scrprintf(win_bottom);
66 +  gotoxy(2, 24); scrprintf("%s", win_bottom);
67    gotoxy(10, 5);
68 -  scrprintf(M_ARJDISP_COPYRIGHT);
69 +  scrprintf("%s", M_ARJDISP_COPYRIGHT);
70    gotoxy(10, 6);
71 -  scrprintf(M_ARJDISP_DISTRIBUTION);
72 +  scrprintf("%s", M_ARJDISP_DISTRIBUTION);
73    gotoxy(10, 7);
74 -  scrprintf(M_ARJDISP_LICENSE);
75 +  scrprintf("%s", M_ARJDISP_LICENSE);
76    gotoxy(16, 10);
77    scrprintf(M_PROCESSING_ARCHIVE, archive_name);
78    gotoxy(16, 12);
79 @@ -132,13 +132,13 @@
80      break;
81    }
82    gotoxy(15, 14);
83 -  scrprintf(ind_top);
84 +  scrprintf("%s", ind_top);
85    gotoxy(15, 15);
86 -  scrprintf(ind_middle);
87 +  scrprintf("%s", ind_middle);
88    gotoxy(15, 16);
89 -  scrprintf(ind_bottom);
90 +  scrprintf("%s", ind_bottom);
91    gotoxy(16, 18);
92 -  scrprintf(M_ARJDISP_CTR_START);
93 +  scrprintf("%s", M_ARJDISP_CTR_START);
94   }
95   else
96   {
97 @@ -146,7 +146,7 @@
98    gotoxy(16, 15);
99    memset(progress, indo, i);
100    progress[i]='\0';
101 -  scrprintf(progress);
102 +  scrprintf("%s", progress);
103    gotoxy(16, 18);
104    scrprintf(M_ARJDISP_CTR, calc_percentage(bytes, uncompsize)/10);
105   }
106 @@ -165,19 +165,19 @@
107   textcolor(7);
108   clrscr();
109   gotoxy(2, 2);
110 - scrprintf(win_top);
111 + scrprintf("%s", win_top);
112   for(i=3; i<24; i++)
113   {
114 -  gotoxy(2, i); scrprintf(win_border);
115 -  gotoxy(79, i); scrprintf(win_border);
116 +  gotoxy(2, i); scrprintf("%s", win_border);
117 +  gotoxy(79, i); scrprintf("%s", win_border);
118   }
119 - gotoxy(2, 24); scrprintf(win_bottom);
120 + gotoxy(2, 24); scrprintf("%s", win_bottom);
121   gotoxy(10, 5);
122 - scrprintf(M_ARJDISP_COPYRIGHT);
123 + scrprintf("%s", M_ARJDISP_COPYRIGHT);
124   gotoxy(10, 6);
125 - scrprintf(M_ARJDISP_DISTRIBUTION);
126 + scrprintf("%s", M_ARJDISP_DISTRIBUTION);
127   gotoxy(10, 7);
128 - scrprintf(M_ARJDISP_LICENSE);
129 + scrprintf("%s", M_ARJDISP_LICENSE);
130   gotoxy(16, 10);
131   scrprintf(M_FINISHED_PROCESSING, archive_name);
132   gotoxy(1, 24);
133 diff -urN arj-3.10.22/arjsfx.c arj-3.10.22.ne/arjsfx.c
134 --- arj-3.10.22/arjsfx.c        2005-06-21 21:53:14.000000000 +0200
135 +++ arj-3.10.22.ne/arjsfx.c     2013-01-30 16:38:12.380643609 +0100
136 @@ -214,7 +214,7 @@
137    freopen(dev_con, m_w, stdout);
138   #if SFX_LEVEL>=ARJSFXV
139    if(ferror(stdout))
140 -   msg_fprintf(stderr, M_DISK_FULL);
141 +   msg_fprintf(stderr, "%s", M_DISK_FULL);
142    if(debug_enabled&&strchr(debug_opt, 't')!=NULL)
143    {
144     ticks=get_ticks()-ticks;
145 diff -urN arj-3.10.22/arj_user.c arj-3.10.22.ne/arj_user.c
146 --- arj-3.10.22/arj_user.c      2004-06-18 18:19:36.000000000 +0200
147 +++ arj-3.10.22.ne/arj_user.c   2013-01-30 16:42:56.832435935 +0100
148 @@ -1059,7 +1059,7 @@
149       if(recover_file(tmp_archive_name, nullstr, tmp_tmp_filename, protected, eof_pos))
150       {
151        msg_cprintf(H_HL, M_CANT_FIND_DAMAGE, archive_name);
152 -      printf(lf);
153 +      fputs(lf, stdout);
154       }
155       else
156       {
157 @@ -1294,7 +1294,7 @@
158     if(recover_file(archive_name, nullstr, nullstr, protected, eof_pos))
159     {
160      msg_cprintf(H_HL, M_CANT_FIND_DAMAGE, archive_name);
161 -    printf(lf);
162 +    fputs(lf, stdout);
163     }
164     else
165     {
166 @@ -2303,7 +2303,7 @@
167    timestamp_to_str(timetext, &ftime_stamp);
168    msg_cprintf(H_HL|H_NFMT, M_ARCHIVE_CREATED, timetext);
169    if(show_ansi_comments)
170 -   printf(cmt_ptr);
171 +   fputs(cmt_ptr, stdout);
172    else
173     display_comment(cmt_ptr);
174    /* The sfx_setup() occurs here */
175 diff -urN arj-3.10.22/rearj.c arj-3.10.22.ne/rearj.c
176 --- arj-3.10.22/rearj.c 2005-06-21 21:53:14.000000000 +0200
177 +++ arj-3.10.22.ne/rearj.c      2013-01-30 16:44:17.368666299 +0100
178 @@ -935,7 +935,7 @@
179   msg_cprintf(H_HL|H_NFMT, M_OLD_SIZE, old_fsize);
180   msg_cprintf(H_HL|H_NFMT, M_NEW_SIZE, new_fsize);
181   msg_cprintf(H_HL|H_NFMT, M_SAVINGS_SIZE, gain);
182 - printf(lf);
183 + fputs(lf, stdout);
184   total_old_fsize+=old_fsize;
185   total_new_fsize+=new_fsize;
186   total_files++;
187 diff -urN arj-3.10.22/register.c arj-3.10.22.ne/register.c
188 --- arj-3.10.22/register.c      2004-04-21 09:04:10.000000000 +0200
189 +++ arj-3.10.22.ne/register.c   2013-01-30 16:46:12.208044161 +0100
190 @@ -205,7 +205,7 @@
191   char reg_source[200];
192   int i;
193  
194 - printf(M_REGISTER_BANNER);
195 + fputs(M_REGISTER_BANNER, stdout);
196   integrity_pattern[0]--;
197   build_crc32_table();
198   if(argc!=2)
This page took 0.039888 seconds and 3 git commands to generate.