From 8b06b99603ed5cf7b1c1e42393873f494eebb58e Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Wed, 28 Sep 2022 18:05:50 +0200 Subject: Use pd_error() instead of the deprecated error() Origin: Debian Forwarded: no Last-Update: 2022-09-28 Last-Update: 2022-09-28 Gbp-Pq: Name pd_error.patch --- catch13~.c | 2 +- cdplayer.c | 20 ++++++++++---------- piperead~.c | 2 +- pipewrite~.c | 2 +- send13~.c | 2 +- sfwrite13~.c | 2 +- streamout13~.c | 2 +- wavinfo.c | 6 +++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/catch13~.c b/catch13~.c index 9205f5c..5409d6a 100644 --- a/catch13~.c +++ b/catch13~.c @@ -66,7 +66,7 @@ t_int *sigcatch13_perf8(t_int *w) else dsp_add(sigcatch13_perf8, 3, x->x_vec, sp[0]->s_vec, sp[0]->s_n); } - else error("sigcatch13 %s: unexpected vector size", x->x_sym->s_name); + else pd_error(x, "sigcatch13 %s: unexpected vector size", x->x_sym->s_name); } void sigcatch13_free(t_sigcatch13 *x) diff --git a/cdplayer.c b/cdplayer.c index 9529301..9d7cdb8 100644 --- a/cdplayer.c +++ b/cdplayer.c @@ -51,7 +51,7 @@ static void cdplayer_play(t_cdplayer *x, t_floatarg f) childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); // Open device @@ -74,7 +74,7 @@ static void cdplayer_play(t_cdplayer *x, t_floatarg f) ioctl(cdrom,CDROMPLAYTRKIND,(void *) &index); // Play the tracks exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } close (cdrom); } @@ -86,7 +86,7 @@ static void cdplayer_pause(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -95,7 +95,7 @@ static void cdplayer_pause(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } @@ -106,7 +106,7 @@ static void cdplayer_resume(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -115,7 +115,7 @@ static void cdplayer_resume(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } @@ -126,7 +126,7 @@ static void cdplayer_stop(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -135,7 +135,7 @@ static void cdplayer_stop(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } @@ -146,7 +146,7 @@ static void cdplayer_eject(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -155,7 +155,7 @@ static void cdplayer_eject(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } diff --git a/piperead~.c b/piperead~.c index a4b6eb7..61e4bc2 100644 --- a/piperead~.c +++ b/piperead~.c @@ -50,7 +50,7 @@ void piperead_tilde_open(t_piperead_tilde *x,t_symbol *filename) if ((x->x_fd = open(fname,( O_NONBLOCK | O_RDONLY))) < 0) { - error("can't open %s",fname); + pd_error(x, "can't open %s",fname); return; } diff --git a/pipewrite~.c b/pipewrite~.c index 5a49be4..44e9777 100644 --- a/pipewrite~.c +++ b/pipewrite~.c @@ -116,7 +116,7 @@ static void pipewrite_tilde_open(t_pipewrite_tilde *x,t_symbol *filename) if ((x->x_file = open(fname,O_WRONLY | O_CREAT | O_NONBLOCK ,0664)) < 0) { - error("can't create %s",fname); + pd_error(x, "can't create %s",fname); return; } diff --git a/send13~.c b/send13~.c index c4c9a2f..20518d7 100644 --- a/send13~.c +++ b/send13~.c @@ -53,7 +53,7 @@ { if (x->x_n == sp[0]->s_n) dsp_add(sigsend13_perform, 3, sp[0]->s_vec, x->x_vec, sp[0]->s_n); - else error("sigsend13 %s: unexpected vector size", x->x_sym->s_name); + else pd_error(x, "sigsend13 %s: unexpected vector size", x->x_sym->s_name); } void sigsend13_free(t_sigsend13 *x) diff --git a/sfwrite13~.c b/sfwrite13~.c index 1b1da3e..95e6f0c 100644 --- a/sfwrite13~.c +++ b/sfwrite13~.c @@ -166,7 +166,7 @@ static void sfwrite13_open(t_sfwrite13 *x,t_symbol *filename) if ((x->x_file = open(fname,OPENPARAMS,0664)) < 0) { - error("can't create %s",fname); + pd_error(x, "can't create %s",fname); return; } diff --git a/streamout13~.c b/streamout13~.c index b2762f0..a50240b 100644 --- a/streamout13~.c +++ b/streamout13~.c @@ -90,7 +90,7 @@ static void streamout13_connect(t_streamout13 *x, t_symbol *hostname, if (x->x_fd >= 0) { - error("streamout13_connect: already connected - reconnecting"); + pd_error(x, "streamout13_connect: already connected - reconnecting"); sys_closesocket(x->x_fd); x->x_fd = -1; outlet_float(x->x_obj.ob_outlet, 0); diff --git a/wavinfo.c b/wavinfo.c index 9d5c20d..9b398ff 100644 --- a/wavinfo.c +++ b/wavinfo.c @@ -87,7 +87,7 @@ static void wavinfo_symbol(t_wavinfo *x, t_symbol *filename) canvas_makefilename(x->x_canvas, filename->s_name,fname, MAXPDSTRING); if ((x->x_fd = open(fname,( O_NONBLOCK | O_RDONLY))) < 0) { - error("can't open %s",fname); + pd_error(x, "can't open %s",fname); return; } @@ -106,10 +106,10 @@ static void wavinfo_symbol(t_wavinfo *x, t_symbol *filename) outlet_float(x->x_out1,x->x_channels); outlet_float(x->x_out0,x->x_nsamples); }else{ - error("not a valid wave-file"); + pd_error(x, "not a valid wave-file"); } }else{ - error("could not read wav-header"); + pd_error(x, "could not read wav-header"); } close (x->x_fd); } -- cgit v1.2.3 From d0fda7904bd11c2735f618070e1cc8e83ac0f839 Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Wed, 28 Sep 2022 18:05:50 +0200 Subject: fixed format-security errors Forwarded: no Last-Update: 2017-01-15 Last-Update: 2017-01-15 Gbp-Pq: Name format-security.patch --- cdplayer.c | 2 +- openpatch.c | 2 +- strippath.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cdplayer.c b/cdplayer.c index 9d7cdb8..59d7128 100644 --- a/cdplayer.c +++ b/cdplayer.c @@ -29,7 +29,7 @@ static void *cdplayer_new() t_cdplayer *x = (t_cdplayer *)pd_new(cdplayer_class); outlet_new(&x->x_obj, &s_bang); - sprintf(devicename,"/dev/cdrom"); + sprintf(devicename, "%s", "/dev/cdrom"); x->device = gensym(devicename); /* fd = open(x->device->s_name, O_RDONLY); diff --git a/openpatch.c b/openpatch.c index 915a379..3591a1a 100644 --- a/openpatch.c +++ b/openpatch.c @@ -55,7 +55,7 @@ static void openpatch_symbol(t_openpatch *x, t_symbol *s) } else { strcpy (filename,s->s_name); - sprintf (path,x->x_path->s_name); + sprintf (path, "%s", x->x_path->s_name); } post ("path:%s , name:%s",path,filename); glob_evalfile(0,gensym(filename),gensym(path)); diff --git a/strippath.c b/strippath.c index 8af95fe..a6fe3d4 100644 --- a/strippath.c +++ b/strippath.c @@ -49,7 +49,7 @@ static void strippath_symbol(t_strippath *x, t_symbol *s) } else { strcpy (filename,s->s_name); - sprintf (path,x->x_path->s_name); + sprintf (path, "%s", x->x_path->s_name); } outlet_symbol(x->x_obj.ob_outlet,gensym(filename)); // post ("path:%s , name:%s",path,filename); -- cgit v1.2.3 From 327119aefd0bd1d00395eb11aee7c08eec0ccad6 Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Fri, 25 Nov 2022 00:03:08 +0100 Subject: Use pd_error() instead of the deprecated error() Origin: Debian Forwarded: no Last-Update: 2022-09-28 Last-Update: 2022-09-28 Gbp-Pq: Name pd_error.patch --- catch13~.c | 2 +- cdplayer.c | 20 ++++++++++---------- piperead~.c | 2 +- pipewrite~.c | 2 +- send13~.c | 2 +- sfwrite13~.c | 2 +- streamout13~.c | 2 +- wavinfo.c | 6 +++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/catch13~.c b/catch13~.c index 9205f5c..5409d6a 100644 --- a/catch13~.c +++ b/catch13~.c @@ -66,7 +66,7 @@ t_int *sigcatch13_perf8(t_int *w) else dsp_add(sigcatch13_perf8, 3, x->x_vec, sp[0]->s_vec, sp[0]->s_n); } - else error("sigcatch13 %s: unexpected vector size", x->x_sym->s_name); + else pd_error(x, "sigcatch13 %s: unexpected vector size", x->x_sym->s_name); } void sigcatch13_free(t_sigcatch13 *x) diff --git a/cdplayer.c b/cdplayer.c index 9529301..9d7cdb8 100644 --- a/cdplayer.c +++ b/cdplayer.c @@ -51,7 +51,7 @@ static void cdplayer_play(t_cdplayer *x, t_floatarg f) childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); // Open device @@ -74,7 +74,7 @@ static void cdplayer_play(t_cdplayer *x, t_floatarg f) ioctl(cdrom,CDROMPLAYTRKIND,(void *) &index); // Play the tracks exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } close (cdrom); } @@ -86,7 +86,7 @@ static void cdplayer_pause(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -95,7 +95,7 @@ static void cdplayer_pause(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } @@ -106,7 +106,7 @@ static void cdplayer_resume(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -115,7 +115,7 @@ static void cdplayer_resume(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } @@ -126,7 +126,7 @@ static void cdplayer_stop(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -135,7 +135,7 @@ static void cdplayer_stop(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } @@ -146,7 +146,7 @@ static void cdplayer_eject(t_cdplayer *x) int childpid; childpid = fork(); if (childpid < 0) { - error ("cdplayer: could not fork!"); + pd_error (x, "cdplayer: could not fork!"); } if (!childpid){ cdrom = open(x->device->s_name,O_RDONLY); @@ -155,7 +155,7 @@ static void cdplayer_eject(t_cdplayer *x) close (cdrom); exit (0); }else{ - error ("cdplayer: could not open %s",x->device->s_name); + pd_error (x, "cdplayer: could not open %s",x->device->s_name); } } } diff --git a/piperead~.c b/piperead~.c index a4b6eb7..61e4bc2 100644 --- a/piperead~.c +++ b/piperead~.c @@ -50,7 +50,7 @@ void piperead_tilde_open(t_piperead_tilde *x,t_symbol *filename) if ((x->x_fd = open(fname,( O_NONBLOCK | O_RDONLY))) < 0) { - error("can't open %s",fname); + pd_error(x, "can't open %s",fname); return; } diff --git a/pipewrite~.c b/pipewrite~.c index 5a49be4..44e9777 100644 --- a/pipewrite~.c +++ b/pipewrite~.c @@ -116,7 +116,7 @@ static void pipewrite_tilde_open(t_pipewrite_tilde *x,t_symbol *filename) if ((x->x_file = open(fname,O_WRONLY | O_CREAT | O_NONBLOCK ,0664)) < 0) { - error("can't create %s",fname); + pd_error(x, "can't create %s",fname); return; } diff --git a/send13~.c b/send13~.c index c4c9a2f..20518d7 100644 --- a/send13~.c +++ b/send13~.c @@ -53,7 +53,7 @@ { if (x->x_n == sp[0]->s_n) dsp_add(sigsend13_perform, 3, sp[0]->s_vec, x->x_vec, sp[0]->s_n); - else error("sigsend13 %s: unexpected vector size", x->x_sym->s_name); + else pd_error(x, "sigsend13 %s: unexpected vector size", x->x_sym->s_name); } void sigsend13_free(t_sigsend13 *x) diff --git a/sfwrite13~.c b/sfwrite13~.c index 1b1da3e..95e6f0c 100644 --- a/sfwrite13~.c +++ b/sfwrite13~.c @@ -166,7 +166,7 @@ static void sfwrite13_open(t_sfwrite13 *x,t_symbol *filename) if ((x->x_file = open(fname,OPENPARAMS,0664)) < 0) { - error("can't create %s",fname); + pd_error(x, "can't create %s",fname); return; } diff --git a/streamout13~.c b/streamout13~.c index b2762f0..a50240b 100644 --- a/streamout13~.c +++ b/streamout13~.c @@ -90,7 +90,7 @@ static void streamout13_connect(t_streamout13 *x, t_symbol *hostname, if (x->x_fd >= 0) { - error("streamout13_connect: already connected - reconnecting"); + pd_error(x, "streamout13_connect: already connected - reconnecting"); sys_closesocket(x->x_fd); x->x_fd = -1; outlet_float(x->x_obj.ob_outlet, 0); diff --git a/wavinfo.c b/wavinfo.c index 9d5c20d..9b398ff 100644 --- a/wavinfo.c +++ b/wavinfo.c @@ -87,7 +87,7 @@ static void wavinfo_symbol(t_wavinfo *x, t_symbol *filename) canvas_makefilename(x->x_canvas, filename->s_name,fname, MAXPDSTRING); if ((x->x_fd = open(fname,( O_NONBLOCK | O_RDONLY))) < 0) { - error("can't open %s",fname); + pd_error(x, "can't open %s",fname); return; } @@ -106,10 +106,10 @@ static void wavinfo_symbol(t_wavinfo *x, t_symbol *filename) outlet_float(x->x_out1,x->x_channels); outlet_float(x->x_out0,x->x_nsamples); }else{ - error("not a valid wave-file"); + pd_error(x, "not a valid wave-file"); } }else{ - error("could not read wav-header"); + pd_error(x, "could not read wav-header"); } close (x->x_fd); } -- cgit v1.2.3 From d769091812d3d11f802cde5cefbc2d19a06306da Mon Sep 17 00:00:00 2001 From: Debian Multimedia Maintainers Date: Fri, 25 Nov 2022 00:03:08 +0100 Subject: fixed format-security errors Forwarded: no Last-Update: 2017-01-15 Last-Update: 2017-01-15 Gbp-Pq: Name format-security.patch --- cdplayer.c | 2 +- openpatch.c | 2 +- strippath.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cdplayer.c b/cdplayer.c index 9d7cdb8..59d7128 100644 --- a/cdplayer.c +++ b/cdplayer.c @@ -29,7 +29,7 @@ static void *cdplayer_new() t_cdplayer *x = (t_cdplayer *)pd_new(cdplayer_class); outlet_new(&x->x_obj, &s_bang); - sprintf(devicename,"/dev/cdrom"); + sprintf(devicename, "%s", "/dev/cdrom"); x->device = gensym(devicename); /* fd = open(x->device->s_name, O_RDONLY); diff --git a/openpatch.c b/openpatch.c index 915a379..3591a1a 100644 --- a/openpatch.c +++ b/openpatch.c @@ -55,7 +55,7 @@ static void openpatch_symbol(t_openpatch *x, t_symbol *s) } else { strcpy (filename,s->s_name); - sprintf (path,x->x_path->s_name); + sprintf (path, "%s", x->x_path->s_name); } post ("path:%s , name:%s",path,filename); glob_evalfile(0,gensym(filename),gensym(path)); diff --git a/strippath.c b/strippath.c index 8af95fe..a6fe3d4 100644 --- a/strippath.c +++ b/strippath.c @@ -49,7 +49,7 @@ static void strippath_symbol(t_strippath *x, t_symbol *s) } else { strcpy (filename,s->s_name); - sprintf (path,x->x_path->s_name); + sprintf (path, "%s", x->x_path->s_name); } outlet_symbol(x->x_obj.ob_outlet,gensym(filename)); // post ("path:%s , name:%s",path,filename); -- cgit v1.2.3