Re: [FFmpeg-devel] [PATCH 1/2] avformat/rpl: Replace strcpy with av_strlcpy

2019-07-10 Thread Michael Niedermayer
On Tue, Jul 09, 2019 at 10:46:14PM +0100, Cameron Cawley wrote:
> The second use of strcpy() that this patch fixes was added in
> commit 0e9c01f.

the first strcpy is added by:

commit ee32e12ccb0d2af99c356ff7730ecfa07fd5c945
Author: Cameron Cawley 
Date:   Thu Jun 27 20:56:02 2019 +0100

avformat/rpl: Support files containing Replay IMA ADPCM audio

Signed-off-by: Michael Niedermayer 

diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index 17b45e3a67..c28ae696ac 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -189,7 +190,9 @@ static int rpl_read_header(AVFormatContext *s)
 
 // ARMovie supports multiple audio tracks; I don't have any
 // samples, though. This code will ignore additional tracks.
-audio_format = read_line_and_int(pb, &error);  // audio format ID
+error |= read_line(pb, line, sizeof(line));
+audio_format = read_int(line, &endptr, &error);  // audio format ID
+strcpy(audio_codec, endptr);
 if (audio_format) {
 ast = avformat_new_stream(s, NULL);
 if (!ast)

Its not good to apply patches which add bad code just to remove it
again in the next commit

ill apply the strcpy hunk which (should) apply to git master

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"Nothing to hide" only works if the folks in power share the values of
you and everyone you know entirely and always will -- Tom Scott



signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] avformat/rpl: Replace strcpy with av_strlcpy

2019-07-09 Thread Cameron Cawley
The second use of strcpy() that this patch fixes was added in
commit 0e9c01f.

Regards
Cameron

On Fri, 5 Jul 2019 at 17:47, Michael Niedermayer 
wrote:

> On Sun, Jun 30, 2019 at 12:00:43AM +0100, Cameron Cawley wrote:
> > ---
> >  libavformat/rpl.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavformat/rpl.c b/libavformat/rpl.c
> > index b4859320f4..579ab4f57e 100644
> > --- a/libavformat/rpl.c
> > +++ b/libavformat/rpl.c
> > @@ -192,7 +192,7 @@ static int rpl_read_header(AVFormatContext *s)
> >  // samples, though. This code will ignore additional tracks.
> >  error |= read_line(pb, line, sizeof(line));
> >  audio_format = read_int(line, &endptr, &error);  // audio format ID
> > -strcpy(audio_codec, endptr);
> > +av_strlcpy(audio_codec, endptr, RPL_LINE_LENGTH);
> >  if (audio_format) {
> >  ast = avformat_new_stream(s, NULL);
> >  if (!ast)
> > @@ -203,7 +203,7 @@ static int rpl_read_header(AVFormatContext *s)
> >  ast->codecpar->channels= read_line_and_int(pb,
> &error);  // number of audio channels
> >  error |= read_line(pb, line, sizeof(line));
> >  ast->codecpar->bits_per_coded_sample = read_int(line, &endptr,
> &error);  // audio bits per sample
> > -strcpy(audio_type, endptr);
> > +av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH);
> >  // At least one sample uses 0 for ADPCM, which is really 4 bits
> >  // per sample.
> >  if (ast->codecpar->bits_per_coded_sample == 0)
>
> please include this in the patch that adds the strcpy()
>
> thanks
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] avformat/rpl: Replace strcpy with av_strlcpy

2019-07-05 Thread Michael Niedermayer
On Sun, Jun 30, 2019 at 12:00:43AM +0100, Cameron Cawley wrote:
> ---
>  libavformat/rpl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/rpl.c b/libavformat/rpl.c
> index b4859320f4..579ab4f57e 100644
> --- a/libavformat/rpl.c
> +++ b/libavformat/rpl.c
> @@ -192,7 +192,7 @@ static int rpl_read_header(AVFormatContext *s)
>  // samples, though. This code will ignore additional tracks.
>  error |= read_line(pb, line, sizeof(line));
>  audio_format = read_int(line, &endptr, &error);  // audio format ID
> -strcpy(audio_codec, endptr);
> +av_strlcpy(audio_codec, endptr, RPL_LINE_LENGTH);
>  if (audio_format) {
>  ast = avformat_new_stream(s, NULL);
>  if (!ast)
> @@ -203,7 +203,7 @@ static int rpl_read_header(AVFormatContext *s)
>  ast->codecpar->channels= read_line_and_int(pb, &error);  // 
> number of audio channels
>  error |= read_line(pb, line, sizeof(line));
>  ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, 
> &error);  // audio bits per sample
> -strcpy(audio_type, endptr);
> +av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH);
>  // At least one sample uses 0 for ADPCM, which is really 4 bits
>  // per sample.
>  if (ast->codecpar->bits_per_coded_sample == 0)

please include this in the patch that adds the strcpy()

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] avformat/rpl: Replace strcpy with av_strlcpy

2019-07-03 Thread Cameron Cawley
The patch should be applied on top of the Replay ADPCM patches.

Regards
Cameron


On Mon, 1 Jul 2019 at 15:07, Michael Niedermayer 
wrote:

> On Sun, Jun 30, 2019 at 12:00:43AM +0100, Cameron Cawley wrote:
> > ---
> >  libavformat/rpl.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
>
> this doesnt apply, against which branch is that patch ?


> thx
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> It is what and why we do it that matters, not just one of them.
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/2] avformat/rpl: Replace strcpy with av_strlcpy

2019-07-01 Thread Michael Niedermayer
On Sun, Jun 30, 2019 at 12:00:43AM +0100, Cameron Cawley wrote:
> ---
>  libavformat/rpl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

this doesnt apply, against which branch is that patch ?

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 1/2] avformat/rpl: Replace strcpy with av_strlcpy

2019-06-29 Thread Cameron Cawley
---
 libavformat/rpl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index b4859320f4..579ab4f57e 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -192,7 +192,7 @@ static int rpl_read_header(AVFormatContext *s)
 // samples, though. This code will ignore additional tracks.
 error |= read_line(pb, line, sizeof(line));
 audio_format = read_int(line, &endptr, &error);  // audio format ID
-strcpy(audio_codec, endptr);
+av_strlcpy(audio_codec, endptr, RPL_LINE_LENGTH);
 if (audio_format) {
 ast = avformat_new_stream(s, NULL);
 if (!ast)
@@ -203,7 +203,7 @@ static int rpl_read_header(AVFormatContext *s)
 ast->codecpar->channels= read_line_and_int(pb, &error);  // 
number of audio channels
 error |= read_line(pb, line, sizeof(line));
 ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, 
&error);  // audio bits per sample
-strcpy(audio_type, endptr);
+av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH);
 // At least one sample uses 0 for ADPCM, which is really 4 bits
 // per sample.
 if (ast->codecpar->bits_per_coded_sample == 0)
-- 
2.11.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".