]>
Commit | Line | Data |
---|---|---|
c214b31f JB |
1 | --- cinepaint/lib/wire/datadir.c.orig 2006-10-04 20:10:06.000000000 +0200 |
2 | +++ cinepaint/lib/wire/datadir.c 2013-03-30 13:43:18.295745054 +0100 | |
3 | @@ -176,7 +176,7 @@ | |
4 | char *text = (char*) calloc( sizeof(char), len ); | |
5 | text[0] = 0; | |
6 | /* whats the path for the executeable ? */ | |
7 | - snprintf (text, len-1, filename); | |
8 | + snprintf (text, len-1, "%s", filename); | |
9 | ||
10 | if(text[0] == '~') | |
11 | { | |
12 | @@ -197,7 +197,7 @@ | |
13 | snprintf( text, 1024, "which %s", filename); | |
14 | pp = popen( text, "r" ); | |
15 | if (pp) { | |
16 | - if (fscanf (pp, "%s", text) != 1) | |
17 | + if (fscanf (pp, "%1023s", text) != 1) | |
18 | { | |
19 | pclose (pp); | |
20 | printf( "no executeable path found\n" ); | |
21 | @@ -208,10 +208,7 @@ | |
22 | ||
23 | if(text[0] != DIR_SEPARATOR_C) | |
24 | { | |
25 | - char* cn = (char*) calloc(2048, sizeof(char)); | |
26 | - sprintf (cn, "%s%s%s", getenv("PWD"), DIR_SEPARATOR, filename); | |
27 | - sprintf (text, cn); | |
28 | - if(cn) free(cn); | |
29 | + snprintf (text, 1024, "%s%s%s", getenv("PWD"), DIR_SEPARATOR, filename); | |
30 | } | |
31 | } | |
32 | ||
33 | --- cinepaint/plug-ins/bracketing_to_hdr/gui/gui_rest.cpp.orig 2009-01-16 17:06:21.000000000 +0100 | |
34 | +++ cinepaint/plug-ins/bracketing_to_hdr/gui/gui_rest.cpp 2013-03-30 13:59:50.775286775 +0100 | |
35 | @@ -138,7 +138,7 @@ | |
36 | { | |
37 | char txt[256]; | |
38 | snprintf (txt, 256, _("A file \"%s\" already exists."), fl_filename_name(fname)); | |
39 | - switch (fl_choice (txt, _("Cancel"), _("Overwrite"), _("Overwrite all"))) | |
40 | + switch (fl_choice ("%s", _("Cancel"), _("Overwrite"), _("Overwrite all"), txt)) | |
41 | { | |
42 | case 2: overwrite_warning_ = false; break; | |
43 | case 1: break; | |
44 | --- cinepaint/plug-ins/bracketing_to_hdr/jhead/exif.c.orig 2006-12-28 09:50:59.000000000 +0100 | |
45 | +++ cinepaint/plug-ins/bracketing_to_hdr/jhead/exif.c 2013-03-30 14:05:14.796823491 +0100 | |
46 | @@ -416,7 +416,7 @@ | |
47 | } | |
48 | } | |
49 | if (DumpExifMap){ | |
50 | - printf("Map: %05d-%05d: Directory\n",DirStart-OffsetBase, DirEnd+4-OffsetBase); | |
51 | + printf("Map: %05d-%05d: Directory\n",(int)(DirStart-OffsetBase), (int)(DirEnd+4-OffsetBase)); | |
52 | } | |
53 | ||
54 | ||
55 | @@ -485,12 +485,12 @@ | |
56 | // Show tag name | |
57 | for (a=0;;a++){ | |
58 | if (a >= TAG_TABLE_SIZE){ | |
59 | - printf(IndentString); | |
60 | + fputs(IndentString, stdout); | |
61 | printf(" Unknown Tag %04x Value = ", Tag); | |
62 | break; | |
63 | } | |
64 | if (TagTable[a].Tag == Tag){ | |
65 | - printf(IndentString); | |
66 | + fputs(IndentString, stdout); | |
67 | printf(" %s = ",TagTable[a].Desc); | |
68 | break; | |
69 | } | |
70 | --- cinepaint/plug-ins/bracketing_to_hdr/bracketing_to_hdr.cpp.orig 2007-03-30 13:58:40.000000000 +0200 | |
71 | +++ cinepaint/plug-ins/bracketing_to_hdr/bracketing_to_hdr.cpp 2013-03-30 14:10:14.683943826 +0100 | |
72 | @@ -190,7 +190,7 @@ | |
73 | ||
74 | if (strcmp (name, PLUGIN_NAME) == 0) | |
75 | { | |
76 | - sprintf (vals.name, getenv("PWD")); // default for `vals' | |
77 | + snprintf (vals.name, sizeof(vals.name), "%s", getenv("PWD")); // default for `vals' | |
78 | ||
79 | gimp_get_data (PLUGIN_NAME, &vals); // get data from last call | |
80 | //printf ("nach gimp_get_data(): vals = \"%s\"\n", vals.name); | |
81 | @@ -412,7 +412,7 @@ | |
82 | { | |
83 | snprintf (tmp, 256, "\"%s\": %s\n\n%s", | |
84 | fl_filename_name(fname), str_16bitdata, str_downsample); | |
85 | - int choice = fl_choice (tmp, _("Cancel"), _("Downsample"), _("No more warn")); | |
86 | + int choice = fl_choice ("%s", _("Cancel"), _("Downsample"), _("No more warn"), tmp); | |
87 | if (choice == 0) // Cancel | |
88 | { | |
89 | ok = false; | |
90 | --- cinepaint/plug-ins/collect/collect.cpp.orig 2011-11-28 07:58:21.000000000 +0100 | |
91 | +++ cinepaint/plug-ins/collect/collect.cpp 2013-03-30 14:11:46.771504077 +0100 | |
92 | @@ -151,7 +151,7 @@ | |
93 | INIT_I18N_UI(); | |
94 | INIT_FLTK1_CODESET(); | |
95 | ||
96 | - sprintf (vals.name, getenv("PWD")); | |
97 | + snprintf (vals.name, sizeof(vals.name), "%s", getenv("PWD")); | |
98 | gimp_get_data ("collect", &vals); | |
99 | ||
100 | switch (run_mode) | |
101 | @@ -362,7 +362,7 @@ | |
102 | gimp_image_resize (image_ID, max_w, max_h, 0,0); DBG | |
103 | } | |
104 | ||
105 | - sprintf (vals.name, fc->value(1)); | |
106 | + snprintf (vals.name, sizeof(vals.name), "%s", fc->value(1)); | |
107 | char* ptr = strrchr(vals.name, '/'); | |
108 | *ptr = 0; | |
109 | ||
110 | --- cinepaint/plug-ins/dicom/dicom.c.orig 2004-12-05 00:41:52.000000000 +0100 | |
111 | +++ cinepaint/plug-ins/dicom/dicom.c 2013-03-30 14:19:40.876599344 +0100 | |
112 | @@ -346,9 +346,7 @@ | |
113 | ||
114 | if (fd == -1) | |
115 | { | |
116 | - temp = g_strdup_printf(_("Dicom: Can't open file %s."), filename); | |
117 | - g_message (temp); | |
118 | - g_free(temp); | |
119 | + g_message (_("Dicom: Can't open file %s."), filename); | |
120 | return -1; | |
121 | } | |
122 | ||
123 | @@ -361,18 +359,14 @@ | |
124 | /* Check for unsupported formats */ | |
125 | if (g_strncasecmp(buf, "PAPYRUS", 7) == 0) | |
126 | { | |
127 | - temp = g_strdup_printf(_("Dicom: %s is a PAPYRUS DICOM file which this plug-in does not support yet."), filename); | |
128 | - g_message (temp); | |
129 | - g_free(temp); | |
130 | + g_message (_("Dicom: %s is a PAPYRUS DICOM file which this plug-in does not support yet."), filename); | |
131 | return -1; | |
132 | } | |
133 | ||
134 | read(fd, buf, 4); /* This should be dicom */ | |
135 | if (g_strncasecmp(buf,"DICM",4) != 0) | |
136 | { | |
137 | - temp = g_strdup_printf(_("Dicom: %s is not a DICOM file."), filename); | |
138 | - g_message (temp); | |
139 | - g_free(temp); | |
140 | + g_message (_("Dicom: %s is not a DICOM file."), filename); | |
141 | return -1; | |
142 | } | |
143 | ||
144 | --- cinepaint/plug-ins/icc_examin/icc_examin/icc_gl.cpp.orig 2013-03-30 14:00:26.243581158 +0100 | |
145 | +++ cinepaint/plug-ins/icc_examin/icc_examin/icc_gl.cpp 2013-03-30 20:51:37.631911896 +0100 | |
146 | @@ -845,7 +845,7 @@ | |
147 | glRotated (90,0.0,0,1.0); | |
148 | glMatrixMode(GL_MODELVIEW); | |
149 | glTranslated((0.0-0.3),(0.0-0.1),(0.0-0.05)); | |
150 | - sprintf (&text[0],_("0,0,0")); | |
151 | + strcpy (&text[0],_("0,0,0")); | |
152 | ZeichneText(font, text) | |
153 | glTranslated(0.3,0.1,0.05); | |
154 | glRotated (-90,0.0,0,1.0); | |
155 | @@ -959,7 +959,7 @@ | |
156 | if (von_farb_namen_.size()) | |
157 | { | |
158 | ptr = (char*) von_farb_namen_[0].c_str(); | |
159 | - sprintf (&text[0], ptr); | |
160 | + strcpy (&text[0], ptr); | |
161 | glRasterPos3d (0, .5+ueber, 0); | |
162 | ZeichneOText(ortho_font, 1, text) | |
163 | } | |
164 | @@ -968,7 +968,7 @@ | |
165 | if (von_farb_namen_.size()) | |
166 | { | |
167 | ptr = (char*) von_farb_namen_[1].c_str(); | |
168 | - sprintf (&text[0], ptr); | |
169 | + strcpy (&text[0], ptr); | |
170 | if (von_farb_namen_.size() && | |
171 | von_farb_namen_[1] == _("CIE *a")) | |
172 | glRasterPos3d (.0, -.5, a_darstellungs_breite/2.+ueber); | |
173 | @@ -981,7 +981,7 @@ | |
174 | if (von_farb_namen_.size()) | |
175 | { | |
176 | ptr = (char*) von_farb_namen_[2].c_str(); | |
177 | - sprintf (&text[0], ptr); | |
178 | + strcpy (&text[0], ptr); | |
179 | if (von_farb_namen_.size() && | |
180 | von_farb_namen_[2] == _("CIE *b")) | |
181 | glRasterPos3d (b_darstellungs_breite/2.+ueber, -.5, .0); | |
182 | --- cinepaint/plug-ins/icc_examin/icc_examin/icc_helfer.cpp.orig 2008-10-24 21:05:00.000000000 +0200 | |
183 | +++ cinepaint/plug-ins/icc_examin/icc_examin/icc_helfer.cpp 2013-03-30 20:56:50.586319147 +0100 | |
184 | @@ -1201,7 +1201,7 @@ | |
185 | char *text = (char*) calloc( sizeof(char), len ); | |
186 | text[0] = 0; | |
187 | /* whats the path for the executeable ? */ | |
188 | - snprintf (text, len-1, filename); | |
189 | + snprintf (text, len-1, "%s", filename); | |
190 | ||
191 | if(text[0] == '~') | |
192 | { | |
193 | @@ -1242,10 +1242,7 @@ | |
194 | if (text[0] != ICC_DIR_SEPARATOR_C) | |
195 | #endif | |
196 | { | |
197 | - char* cn = (char*) calloc(2048, sizeof(char)); | |
198 | - sprintf (cn, "%s%s%s", getenv("PWD"), ICC_DIR_SEPARATOR, filename); | |
199 | - sprintf (text, cn); | |
200 | - if(cn) free(cn); | |
201 | + snprintf (text, 1024, "%s%s%s", getenv("PWD"), ICC_DIR_SEPARATOR, filename); | |
202 | } | |
203 | } | |
204 | ||
205 | @@ -1495,9 +1492,9 @@ | |
206 | char trenner [16]; | |
207 | ||
208 | if( trennzeichen ) { DBG_PARSER | |
209 | - sprintf (trenner, trennzeichen ); | |
210 | + strcpy (trenner, trennzeichen ); | |
211 | } else { | |
212 | - sprintf (trenner, leer_zeichen ); | |
213 | + strcpy (trenner, leer_zeichen ); | |
214 | suchenErsetzen( zeile, ",", ".", 0 ); | |
215 | } | |
216 | ||
217 | --- cinepaint/plug-ins/icc_examin/icc_examin/icc_profile.cpp.orig 2007-11-09 16:10:45.000000000 +0100 | |
218 | +++ cinepaint/plug-ins/icc_examin/icc_examin/icc_profile.cpp 2013-03-30 21:02:49.252840010 +0100 | |
219 | @@ -696,7 +696,7 @@ | |
220 | if(texte.size()) | |
221 | { | |
222 | text = (char*) calloc( sizeof(char), strlen(texte[0].c_str()) * 4 ); | |
223 | - sprintf( text, texte[0].c_str() ); | |
224 | + strcpy( text, texte[0].c_str() ); | |
225 | } | |
226 | } | |
227 | ||
228 | --- cinepaint/plug-ins/icc_examin/icc_examin/icc_vrml_parser.cpp.orig 2007-11-09 16:10:46.000000000 +0100 | |
229 | +++ cinepaint/plug-ins/icc_examin/icc_examin/icc_vrml_parser.cpp 2013-03-30 21:33:44.351494954 +0100 | |
230 | @@ -91,7 +91,7 @@ | |
231 | std::vector<ZifferWort> werte; // intermediate return value | |
232 | char trennzeichen[12]; // to be used separating signs | |
233 | trennzeichen[0] = ','; | |
234 | - sprintf(&trennzeichen[1], leer_zeichen); | |
235 | + strcpy(&trennzeichen[1], leer_zeichen); | |
236 | const bool anfuehrungstriche = false; // set no quotation marks | |
237 | unsigned int dimensionen; // number of belonging values | |
238 | int achse; // selected value from dimensionen | |
239 | --- cinepaint/plug-ins/icc_examin/icc_examin/icc_betrachter.cxx.orig 2008-05-22 10:46:30.000000000 +0200 | |
240 | +++ cinepaint/plug-ins/icc_examin/icc_examin/icc_betrachter.cxx 2013-03-30 21:34:41.734136993 +0100 | |
241 | @@ -133,7 +133,7 @@ | |
242 | icc_examin->icc_betrachter->tag_nummer = _tag; | |
243 | ||
244 | // = profile.profil()->printTagInfo(icc_examin->icc_betrachter->tag_nummer); | |
245 | - sprintf (&typ[0], profile.profil()->printTagInfo(icc_examin->icc_betrachter->tag_nummer)[1].c_str()); | |
246 | + strcpy (&typ[0], profile.profil()->printTagInfo(icc_examin->icc_betrachter->tag_nummer)[1].c_str()); | |
247 | ||
248 | DBG_PROG_V( profile.profil()->printTagInfo(icc_examin->icc_betrachter->tag_nummer)[1].c_str() ) | |
249 | ||
250 | --- cinepaint/plug-ins/icc_examin/icc_examin/my_file_chooser2.cxx.orig 2007-11-09 16:10:46.000000000 +0100 | |
251 | +++ cinepaint/plug-ins/icc_examin/icc_examin/my_file_chooser2.cxx 2013-03-30 22:33:17.075667647 +0100 | |
252 | @@ -564,7 +564,7 @@ | |
253 | } | |
254 | } else { | |
255 | // File doesn't exist, so beep at and alert the user... | |
256 | - fl_alert(existing_file_label); | |
257 | + fl_alert("%s", existing_file_label); | |
258 | } | |
259 | } | |
260 | else if (Fl::event_key() != FL_Delete && | |
261 | @@ -752,7 +752,7 @@ | |
262 | ||
263 | ||
264 | // Get a directory name from the user | |
265 | - if ((dir = fl_input(new_directory_label, NULL)) == NULL) | |
266 | + if ((dir = fl_input("%s", NULL, new_directory_label)) == NULL) | |
267 | return; | |
268 | ||
269 | // Make it relative to the current directory as needed... | |
270 | @@ -871,7 +871,7 @@ | |
271 | item = showChoice->text(showChoice->value()); | |
272 | ||
273 | if (strcmp(item, custom_filter_label) == 0) { | |
274 | - if ((item = fl_input(custom_filter_label, pattern_)) != NULL) { | |
275 | + if ((item = fl_input("%s", pattern_, custom_filter_label)) != NULL) { | |
276 | strlcpy(pattern_, item, sizeof(pattern_)); | |
277 | ||
278 | quote_pathname(temp, item, sizeof(temp)); | |
279 | --- cinepaint/plug-ins/icc_examin/icc_examin/fl_i18n/fl_i18n.cxx.orig 2009-01-16 17:06:21.000000000 +0100 | |
280 | +++ cinepaint/plug-ins/icc_examin/icc_examin/fl_i18n/fl_i18n.cxx 2013-03-30 22:39:36.499655453 +0100 | |
281 | @@ -110,7 +110,7 @@ | |
282 | if(pos != 0) | |
283 | { | |
284 | /* 1 a. select an appropriate charset (needed for non UTF-8 fltk/gtk1)*/ | |
285 | - sprintf (codeset, codeset_); DBG_PROG_V( locale <<" "<< strrchr(locale,'.')) | |
286 | + strcpy (codeset, codeset_); DBG_PROG_V( locale <<" "<< strrchr(locale,'.')) | |
287 | ||
288 | /* merge charset with locale string */ | |
289 | if(set_codeset != FL_I18N_SETCODESET_NO) | |
290 | @@ -157,7 +157,7 @@ | |
291 | break; | |
292 | default: break; | |
293 | } | |
294 | - if(ptr) snprintf( locale, TEXTLEN, ptr); DBG_PROG_V( locale ) | |
295 | + if(ptr) snprintf( locale, TEXTLEN, "%s", ptr); DBG_PROG_V( locale ) | |
296 | } | |
297 | } | |
298 | } | |
299 | @@ -272,7 +272,7 @@ | |
300 | temp = setlocale (lc, ""); | |
301 | char *tmp = temp ? icc_strdup_m(temp) : NULL; | |
302 | if(tmp) { | |
303 | - snprintf(locale,TEXTLEN, tmp); | |
304 | + snprintf(locale,TEXTLEN, "%s", tmp); | |
305 | DBG_PROG_V( locale ) | |
306 | } | |
307 | /*if(!set_codeset) | |
308 | @@ -282,7 +282,7 @@ | |
309 | ||
310 | // .. or take locale info from environment | |
311 | if(!strlen(locale) && getenv("LANG")) | |
312 | - snprintf(locale,TEXTLEN, getenv("LANG")); | |
313 | + snprintf(locale,TEXTLEN, "%s", getenv("LANG")); | |
314 | # endif | |
315 | ||
316 | ||
317 | --- cinepaint/plug-ins/icc_examin/icc_examin/icc_cinepaint_intern.cpp.orig 2007-11-29 10:55:21.000000000 +0100 | |
318 | +++ cinepaint/plug-ins/icc_examin/icc_examin/icc_cinepaint_intern.cpp 2013-03-30 22:42:22.957304081 +0100 | |
319 | @@ -345,7 +345,7 @@ | |
320 | if(gimp_image_has_icc_profile(image_ID, typ)) { | |
321 | mem_profile = gimp_image_get_icc_profile_by_mem(image_ID, &size, typ); | |
322 | } else { | |
323 | - g_message (_("No profil assigned to image.")); | |
324 | + g_message ("%s", _("No profil assigned to image.")); | |
325 | return -1; | |
326 | } | |
327 | ||
328 | @@ -380,7 +380,7 @@ | |
329 | ||
330 | remove( tname.c_str() ); | |
331 | } else | |
332 | - g_message (_("Profil not written.")); | |
333 | + g_message ("%s", _("Profil not written.")); | |
334 | ||
335 | return image_ID; | |
336 | } | |
337 | @@ -450,9 +450,9 @@ | |
338 | ncl2->anzahl = icValue((icUInt32Number)farben_n); | |
339 | ncl2->koord = icValue((icUInt32Number)farb_kanaele); | |
340 | if(vorname && strlen(vorname) < 32) | |
341 | - sprintf(ncl2->vorname, vorname); | |
342 | + strcpy(ncl2->vorname, vorname); | |
343 | if(nachname && strlen(nachname) < 32) | |
344 | - sprintf(ncl2->nachname, nachname); | |
345 | + strcpy(ncl2->nachname, nachname); | |
346 | ||
347 | DBG_PROG_S( farben_n <<" "<< pcsfarbe.size() ) | |
348 | ||
349 | @@ -470,7 +470,7 @@ | |
350 | (geraetefarbe[farb_kanaele*i+j]*65535.0)); | |
351 | // TODO mark pointer here | |
352 | if (name.size() && name[i].size() < 32) | |
353 | - sprintf(f->name, name[i].c_str()); | |
354 | + strcpy(f->name, name[i].c_str()); | |
355 | ||
356 | #ifdef DEBUG_ | |
357 | if( 10 < i && i < 20 ) | |
358 | @@ -985,7 +985,7 @@ | |
359 | { | |
360 | // has the profile name changed? | |
361 | if (!gimp_image_has_icc_profile(image_ID, ICC_IMAGE_PROFILE)) { | |
362 | - g_message (_("No profil assigned to image.")); | |
363 | + g_message ("%s", _("No profil assigned to image.")); | |
364 | return 1; | |
365 | } | |
366 | ||
367 | @@ -1040,7 +1040,7 @@ | |
368 | hp = cmsOpenProfileFromMem( image_profile, size ); | |
369 | farb_kanaele = _cmsChannelsOf( cmsGetColorSpace( hp ) ); | |
370 | if(farb_kanaele > layer->samplesperpixel) { | |
371 | - g_message (_("Wrong profil assigned to image.")); | |
372 | + g_message ("%s", _("Wrong profil assigned to image.")); | |
373 | return 1; | |
374 | } | |
375 | layer->status |= PROFIL_NEU(1); | |
376 | @@ -1252,7 +1252,7 @@ | |
377 | image_ID = gimp_display_get_image_id( layer.display_ID); | |
378 | gint32 drawable_ID = gimp_image_get_active_layer (image_ID); | |
379 | if(drawable_ID < 0) | |
380 | - g_message(_("No active drawable found.")); | |
381 | + g_message("%s", _("No active drawable found.")); | |
382 | ||
383 | // run | |
384 | { | |
385 | @@ -1558,7 +1558,7 @@ | |
386 | min_y = y; | |
387 | } | |
388 | break; | |
389 | - default: g_message (_("What kind of image is this?")); break; | |
390 | + default: g_message ("%s", _("What kind of image is this?")); break; | |
391 | } | |
392 | } | |
393 | } | |
394 | --- cinepaint/plug-ins/openexr/openexr.cxx.orig 2007-04-20 10:02:38.000000000 +0200 | |
395 | +++ cinepaint/plug-ins/openexr/openexr.cxx 2013-03-31 07:52:25.871488856 +0200 | |
396 | @@ -563,7 +563,7 @@ | |
397 | if (pixels) | |
398 | g_free (pixels); | |
399 | ||
400 | - g_print (e.what ()); | |
401 | + g_print ("%s", e.what ()); | |
402 | gimp_quit (); | |
403 | } | |
404 | } | |
405 | --- cinepaint/plug-ins/pdf/pdf.cpp.orig 2013-03-31 08:14:29.802506316 +0200 | |
406 | +++ cinepaint/plug-ins/pdf/pdf.cpp 2013-03-31 08:21:50.856147492 +0200 | |
407 | @@ -215,9 +215,9 @@ | |
408 | INIT_I18N_UI(); | |
409 | INIT_FLTK1_CODESET(); | |
410 | ||
411 | - sprintf (vals.name, getenv("PWD")); | |
412 | + snprintf (vals.name, sizeof(vals.name), "%s", getenv("PWD")); | |
413 | ||
414 | - snprintf(vals.filename, 1024, param[1].data.d_string); | |
415 | + snprintf(vals.filename, 1024, "%s", param[1].data.d_string); | |
416 | ||
417 | switch (run_mode) | |
418 | { | |
419 | @@ -368,7 +368,7 @@ | |
420 | case GS_PNG48: ptn.append(".png"); break; | |
421 | } | |
422 | ||
423 | - snprintf( vals.name , 1024, ptn.c_str()); | |
424 | + snprintf( vals.name , 1024, "%s", ptn.c_str()); | |
425 | ||
426 | DBG; | |
427 | ||
428 | @@ -551,12 +551,12 @@ | |
429 | { | |
430 | std::stringstream ss; | |
431 | char tmp[1024], file[1024], dir[1024]; | |
432 | - snprintf(tmp, 1023, vals.filename); | |
433 | - snprintf(file, 1023, strrchr(tmp, '/')); | |
434 | + snprintf(tmp, 1023, "%s", vals.filename); | |
435 | + snprintf(file, 1023, "%s", strrchr(tmp, '/')); | |
436 | char *ptr = strrchr(tmp, '/'); | |
437 | const char* viewer = NULL; | |
438 | *ptr = 0; | |
439 | - snprintf(dir, 1023, tmp); | |
440 | + snprintf(dir, 1023, "%s", tmp); | |
441 | WARN_S( dir << file << tmp ); | |
442 | ||
443 | // change the path to the picture | |
444 | --- cinepaint/plug-ins/pdf/pdf_dialog.cxx.orig 2007-06-10 21:13:49.000000000 +0200 | |
445 | +++ cinepaint/plug-ins/pdf/pdf_dialog.cxx 2013-03-31 08:22:54.632417335 +0200 | |
446 | @@ -246,7 +246,7 @@ | |
447 | ||
448 | void take_opts() { | |
449 | const char* text = interpreter_text->value(); | |
450 | - snprintf( vals.command, 1024, text ); | |
451 | + snprintf( vals.command, 1024, "%s", text ); | |
452 | ||
453 | vals.resolution = (int) slider_resolution->value(); | |
454 | vals.ok = 1; | |
455 | --- cinepaint/plug-ins/print/icc_common_funcs.c.orig 2005-04-14 22:31:14.000000000 +0200 | |
456 | +++ cinepaint/plug-ins/print/icc_common_funcs.c 2013-03-31 08:23:47.608189881 +0200 | |
457 | @@ -69,7 +69,7 @@ | |
458 | char* string; | |
459 | ||
460 | string = malloc(sizeof(char)*strlen(text)+1); | |
461 | - sprintf(string, text); | |
462 | + strcpy(string, text); | |
463 | ||
464 | return string; | |
465 | } | |
466 | --- cinepaint/plug-ins/print/print-lcms-funcs.c.orig 2007-03-10 16:01:57.000000000 +0100 | |
467 | +++ cinepaint/plug-ins/print/print-lcms-funcs.c 2013-03-31 08:25:23.445670779 +0200 | |
468 | @@ -191,7 +191,7 @@ | |
469 | linear.Y_Min,linear.Y_Max,linear.K_Min,linear.K_Max, | |
470 | levels); | |
471 | ||
472 | - g_print (gamma_text); | |
473 | + g_print ("%s", gamma_text); | |
474 | ||
475 | gamma[0] = cmsBuildGamma (nEntries, linear.C_Gamma); | |
476 | gamma[1] = cmsBuildGamma (nEntries, linear.M_Gamma); | |
477 | @@ -909,7 +909,7 @@ | |
478 | sprintf (test1, "Lab"); | |
479 | sprintf (test2, "lab"); | |
480 | } else { | |
481 | - sprintf (vals.tiff_file, vals.image_filename); | |
482 | + strcpy (vals.tiff_file, vals.image_filename); | |
483 | change_tiff_fn = FALSE; | |
484 | } | |
485 | ||
486 | @@ -917,7 +917,7 @@ | |
487 | && strstr(vals.image_filename, test2) == NULL | |
488 | && change_tiff_fn ) { | |
489 | ||
490 | - sprintf (txt, vals.image_filename); | |
491 | + strcpy (txt, vals.image_filename); | |
492 | ||
493 | g_print ("%s:%d vals.tiff_file %s\n",__FILE__,__LINE__,vals.image_filename); | |
494 | if (strchr(txt, '.') && strlen (txt) < MAX_PATH - 9) { | |
495 | --- cinepaint/plug-ins/print/print-lcms-options.c.orig 2006-12-20 17:57:31.000000000 +0100 | |
496 | +++ cinepaint/plug-ins/print/print-lcms-options.c 2013-03-31 08:31:17.975319980 +0200 | |
497 | @@ -1051,7 +1051,7 @@ | |
498 | } | |
499 | else | |
500 | if ( (strcmp(vals.o_profile, "")) == 0) | |
501 | - snprintf (vals.o_profile, MAX_PATH, ptr); | |
502 | + snprintf (vals.o_profile, MAX_PATH, "%s", ptr); | |
503 | ||
504 | #ifndef USE_ALL_OPTIONS | |
505 | gtk_widget_hide (matrix_vbox); | |
506 | @@ -1162,7 +1162,7 @@ | |
507 | gpointer user_data) | |
508 | { | |
509 | ||
510 | - sprintf (vals.i_profile, gtk_editable_get_chars(editable,0, | |
511 | + strcpy (vals.i_profile, gtk_editable_get_chars(editable,0, | |
512 | GTK_ENTRY(editable)->text_length)); | |
513 | g_print ("%s %s:%d %s\n",__func__,__FILE__,__LINE__,vals.i_profile); | |
514 | } | |
515 | @@ -1181,7 +1181,7 @@ | |
516 | ||
517 | point = text = g_new (char,MAX_PATH); | |
518 | ||
519 | - sprintf (text, vals.o_profile); | |
520 | + strcpy (text, vals.o_profile); | |
521 | g_print ("%s:%d %s\n",__FILE__,__LINE__,text); | |
522 | ||
523 | if (strchr(text, '.') && strlen (text) < MAX_PATH - 4) { | |
524 | @@ -1561,7 +1561,7 @@ | |
525 | ||
526 | ||
527 | filename = malloc(MAX_PATH); | |
528 | - sprintf (filename, gtk_file_selection_get_filename (GTK_FILE_SELECTION (fileselection1)) ); | |
529 | + strcpy (filename, gtk_file_selection_get_filename (GTK_FILE_SELECTION (fileselection1)) ); | |
530 | ||
531 | ||
532 | // test for a valid profile and give some informations | |
533 | @@ -1662,7 +1662,7 @@ | |
534 | } else if (GTK_TOGGLE_BUTTON (button)->active && vals.icc) { | |
535 | sprintf (text, "%s%s%s%s%s", _("You need to be in \""), _("Direct print"), | |
536 | _("\" mode in order to linearise an printer.\nThis can be done in the tab \""), _("Print Options"), "\"."); | |
537 | - g_message (text); | |
538 | + g_message ("%s", text); | |
539 | } | |
540 | ||
541 | linear.use_lin = thaw_widgets; | |
542 | --- cinepaint/plug-ins/print/print.c.orig 2006-12-15 23:20:22.000000000 +0100 | |
543 | +++ cinepaint/plug-ins/print/print.c 2013-03-31 08:56:49.589162461 +0200 | |
544 | @@ -402,7 +402,7 @@ | |
545 | ICC_PROOF_PROFILE); | |
546 | if(description) | |
547 | { | |
548 | - sprintf (vals.o_profile, description); | |
549 | + strcpy (vals.o_profile, description); | |
550 | free( description ); | |
551 | } | |
552 | } | |
553 | --- cinepaint/plug-ins/rawphoto/rawphoto.c.orig 2008-05-22 06:22:40.000000000 +0200 | |
554 | +++ cinepaint/plug-ins/rawphoto/rawphoto.c 2013-03-31 08:59:15.992565856 +0200 | |
555 | @@ -147,7 +147,7 @@ | |
556 | ptr = strchr( tmpname, '.' ); | |
557 | if(ptr) | |
558 | ptr[1] = 0; | |
559 | - sprintf( &tmpname[strlen(tmpname)], extension ); | |
560 | + strcpy( &tmpname[strlen(tmpname)], extension ); | |
561 | return tmpname; | |
562 | } | |
563 | ||
564 | --- cinepaint/plug-ins/tiff/gui.c.orig 2006-12-11 17:01:08.000000000 +0100 | |
565 | +++ cinepaint/plug-ins/tiff/gui.c 2013-03-31 09:18:13.611808680 +0200 | |
566 | @@ -530,7 +530,7 @@ | |
567 | g_message (_("Your string is too long.\n")); | |
568 | return; | |
569 | } else { | |
570 | - sprintf ( string_ptr, text); | |
571 | + strcpy ( string_ptr, text); | |
572 | } | |
573 | } else { | |
574 | string_ptr[0] = '\000'; | |
575 | --- cinepaint/plug-ins/tiff/info.c.orig 2007-03-08 19:18:52.000000000 +0100 | |
576 | +++ cinepaint/plug-ins/tiff/info.c 2013-03-31 09:21:00.816172023 +0200 | |
577 | @@ -1184,7 +1184,7 @@ | |
578 | mem_profile = gimp_image_get_icc_profile_by_mem(image_ID, &size, ICC_IMAGE_PROFILE); | |
579 | if (mem_profile && size) { | |
580 | profile = cmsOpenProfileFromMem (mem_profile, size); | |
581 | - sprintf (color_space_name_, | |
582 | + strcpy (color_space_name_, | |
583 | gimp_image_get_icc_profile_color_space_name (image_ID, ICC_IMAGE_PROFILE)); | |
584 | DBG (color_space_name_) | |
585 | ||
586 | @@ -1195,7 +1195,7 @@ | |
587 | info->icc_profile_info = calloc (sizeof (char), | |
588 | strlen( gimp_image_get_icc_profile_info(image_ID, ICC_IMAGE_PROFILE) ) | |
589 | + 1); | |
590 | - sprintf (info->icc_profile_info, | |
591 | + strcpy (info->icc_profile_info, | |
592 | gimp_image_get_icc_profile_info(image_ID, ICC_IMAGE_PROFILE)); | |
593 | memcpy (&info->colorspace[0], color_space_name_, 4); | |
594 | info->colorspace[4] = '\000'; | |
595 | --- cinepaint/plug-ins/xwd/xwd.c.orig 2006-10-04 20:34:04.000000000 +0200 | |
596 | +++ cinepaint/plug-ins/xwd/xwd.c 2013-03-31 10:45:08.915167114 +0200 | |
597 | @@ -490,7 +490,7 @@ | |
598 | temp = g_strdup_printf (_("load_image (xwd): XWD-file %s has format %d, depth %d\n\ | |
599 | and bits per pixel %d.\nCurrently this is not supported.\n"), | |
600 | filename, (int)xwdhdr.l_pixmap_format, depth, bpp); | |
601 | - g_message (temp); | |
602 | + g_message ("%s", temp); | |
603 | g_free (temp); | |
604 | return (-1); | |
605 | } | |
606 | --- cinepaint/app/channels_dialog.c.orig 2007-11-09 16:24:26.000000000 +0100 | |
607 | +++ cinepaint/app/channels_dialog.c 2013-03-31 10:11:10.421429638 +0200 | |
608 | @@ -330,7 +330,7 @@ | |
609 | ||
610 | if(strstr(colour_sig,colour_sig_neu) == 0) | |
611 | { | |
612 | - sprintf(colour_sig, colour_sig_neu); | |
613 | + strcpy(colour_sig, colour_sig_neu); | |
614 | channelsD->gimage_id = -1; | |
615 | channels_dialog_update (gimage->ID); | |
616 | } | |
617 | --- cinepaint/app/cms.c.orig 2013-03-31 08:14:29.805839803 +0200 | |
618 | +++ cinepaint/app/cms.c 2013-03-31 10:15:49.914296882 +0200 | |
619 | @@ -1283,7 +1283,7 @@ | |
620 | return_value = g_new(CMSProfile, 1); | |
621 | return_value->cache_key = strdup(cms_get_profile_keyname(profile,mem)); | |
622 | return_value->handle = profile; | |
623 | - sprintf( return_value->cspace, | |
624 | + strcpy( return_value->cspace, | |
625 | cms_get_color_space_name( return_value->handle ) ); | |
626 | ||
627 | /* save an copy of the original icc profile to mem */ | |
628 | @@ -1337,7 +1337,7 @@ | |
629 | return_value = g_new(CMSProfile, 1); | |
630 | return_value->cache_key = strdup(cms_get_profile_keyname(profile,mem_pointer)); | |
631 | return_value->handle = profile; | |
632 | - sprintf( return_value->cspace, | |
633 | + strcpy( return_value->cspace, | |
634 | cms_get_color_space_name( return_value->handle ) ); | |
635 | ||
636 | cache_entry = g_new(ProfileCacheEntry, 1); | |
637 | @@ -1385,7 +1385,7 @@ | |
638 | { CMSProfile *return_value = 0; | |
639 | ProfileCacheEntry *cache_entry = 0; | |
640 | GString *hash_key = g_string_new(NULL); | |
641 | - g_string_sprintf(hash_key, key_name); | |
642 | + g_string_sprintf(hash_key, "%s", key_name); | |
643 | ||
644 | /* generate new profile */ | |
645 | return_value = g_new(CMSProfile, 1); | |
646 | --- cinepaint/app/gdisplay.c.orig 2007-11-09 16:24:27.000000000 +0100 | |
647 | +++ cinepaint/app/gdisplay.c 2013-03-31 10:16:47.006925303 +0200 | |
648 | @@ -319,7 +319,7 @@ | |
649 | ||
650 | if(smr && (strstr(type,"MenuItem") || strstr(type,"GtkMenuItem"))) | |
651 | { | |
652 | - snprintf( path, 64, fac_item->path ); | |
653 | + snprintf( path, 64, "%s", fac_item->path ); | |
654 | ptr = strchr( fac_item->path, '/' ); | |
655 | if(ptr) *ptr=0; | |
656 | # ifdef DEBUG | |
657 | --- cinepaint/app/gimage.c.orig 2008-05-22 10:45:01.000000000 +0200 | |
658 | +++ cinepaint/app/gimage.c 2013-03-31 10:17:20.801814479 +0200 | |
659 | @@ -2941,7 +2941,7 @@ | |
660 | ||
661 | if (error) | |
662 | { | |
663 | - g_message (error); | |
664 | + g_message ("%s", error); | |
665 | return NULL; | |
666 | } | |
667 | ||
668 | --- cinepaint/app/main.c.orig 2008-02-28 10:50:15.000000000 +0100 | |
669 | +++ cinepaint/app/main.c 2013-03-31 10:26:26.293525083 +0200 | |
670 | @@ -610,7 +610,7 @@ | |
671 | if(pos != 0) | |
672 | { | |
673 | /* 1 a. select an appropriate charset (needed for non UTF-8 fltk/gtk1)*/ | |
674 | - sprintf (codeset, codeset_); | |
675 | + strcpy (codeset, codeset_); | |
676 | ||
677 | /* merge charset with locale string */ | |
678 | if(set_locale) | |
679 | @@ -639,7 +639,7 @@ | |
680 | #else | |
681 | char *ptr = setlocale (LC_ALL, ""); | |
682 | #endif | |
683 | - if(ptr) snprintf( locale, TEXTLEN, ptr); | |
684 | + if(ptr) snprintf( locale, TEXTLEN, "%s", ptr); | |
685 | } | |
686 | } | |
687 | } | |
688 | @@ -705,7 +705,7 @@ | |
689 | ||
690 | if(fehler) { | |
691 | d_printf( "osX locale obtained: %s", text ); | |
692 | - snprintf(locale,TEXTLEN, text); | |
693 | + snprintf(locale,TEXTLEN, "%s", text); | |
694 | } else { | |
695 | d_printf( "osX locale not obtained: %s", text ); | |
696 | } | |
697 | @@ -720,7 +720,7 @@ | |
698 | #endif | |
699 | } | |
700 | if (tmp) | |
701 | - snprintf(locale,TEXTLEN, tmp); | |
702 | + snprintf(locale,TEXTLEN, "%s", tmp); | |
703 | set_locale = 0; | |
704 | # else | |
705 | ||
706 | @@ -734,7 +734,7 @@ | |
707 | ||
708 | // .. or take locale info from environment | |
709 | if(getenv("LANG")) | |
710 | - snprintf(locale,TEXTLEN, getenv("LANG")); | |
711 | + snprintf(locale,TEXTLEN, "%s", getenv("LANG")); | |
712 | # endif | |
713 | ||
714 | ||
715 | --- cinepaint/app/rc.c.orig 2012-04-07 03:04:52.000000000 +0200 | |
716 | +++ cinepaint/app/rc.c 2013-03-31 10:28:12.085061991 +0200 | |
717 | @@ -532,7 +532,7 @@ | |
718 | error_msg = open_backup_file (name, &fp_new, &fp_old); | |
719 | if (error_msg != NULL) | |
720 | { | |
721 | - g_message (error_msg); | |
722 | + g_message ("%s", error_msg); | |
723 | return; | |
724 | } | |
725 | ||
726 | --- cinepaint/app/store_frame_manager.c.orig 2007-11-20 07:26:33.000000000 +0100 | |
727 | +++ cinepaint/app/store_frame_manager.c 2013-03-31 10:29:29.551961607 +0200 | |
728 | @@ -2235,7 +2235,7 @@ | |
729 | len = strlen( s->gimage->filename ) + 1; | |
730 | if(s->gimage->filename) free( s->gimage->filename ); | |
731 | s->gimage->filename = malloc( len ); | |
732 | - sprintf( s->gimage->filename, new_fn ); | |
733 | + strcpy( s->gimage->filename, new_fn ); | |
734 | sfm_flipbook_store_update( disp, row+i+1 ); | |
735 | } | |
736 | break; |