Just wanted to check if there was any consensus on what we wanted to do
with these changes. Are we holding off until a future module wide change?
On Wed, Jul 15, 2020 at 8:09 AM James Almer wrote:
> On 7/15/2020 4:06 AM, Nicolas George wrote:
> > Michael Niedermayer (12020-07-14):
> >> Let me ph
On Mon, Jul 13, 2020 at 11:22 AM James Almer wrote:
[...]
> You would need to cast height to size_t for this, i think, but seeing
> av_image_check_size() currently rejects line sizes and plane sizes
> bigger than INT_MAX, maybe we should just keep INT_MAX in the above
> check instead (No need to s
We were previously always filling data by adding offsets to ptr, which
was undefined behavior when ptr was NULL.
Signed-off-by: Brian Kim
---
libavutil/imgutils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 345b7fa94c..721dc2784a
This uses av_image_fill_plane_sizes instead of av_image_fill_pointers
when we are getting plane sizes to avoid UB from adding offsets to NULL.
Signed-off-by: Brian Kim
---
libavcodec/decode.c | 27 +--
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a
This uses av_image_fill_plane_sizes instead of av_image_fill_pointers
when we are getting plane sizes to avoid UB from adding offsets to NULL.
Signed-off-by: Brian Kim
---
libavutil/frame.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/libavutil
This utility helps avoid undefined behavior when doing things like
checking how much memory we need to allocate for an image before we have
allocated a buffer.
Signed-off-by: Brian Kim
---
doc/APIchanges | 3 ++
libavutil/imgutils.c | 98
[...]
On Wed, Jul 8, 2020 at 7:42 PM James Almer wrote:
> The sum of all sizes should be size_t if each size is a size_t. But if
> you do that you can't return error values, so i'm not sure what to
> suggest other than just stick to ints for both (ptrdiff_t linesizes
> should be ok).
> I'd like t
input ptr is null
From 2c269118523de0911f17a4b560b016c34fc3002f Mon Sep 17 00:00:00 2001
From: Brian Kim
Date: Tue, 7 Jul 2020 11:42:35 -0700
Subject: [PATCH 3/3] libavutil/imgutils: check for non-null buffer in
av_image_fill_pointers
We were previously always filling data by adding offsets to
Patch attached
From 6e28dfde91443fba276fdd792dee9480c0b00558 Mon Sep 17 00:00:00 2001
From: Brian Kim
Date: Tue, 7 Jul 2020 11:42:04 -0700
Subject: [PATCH 2/3] libavcodec/decode: avoid UB when getting plane sizes
This uses av_image_fill_plane_sizes instead of av_image_fill_pointers
when we are
, but I could not see any mention of these being allowed.
From a47b3f3b5c2ed4a1caf9f0a3429dd425ce708bb1 Mon Sep 17 00:00:00 2001
From: Brian Kim
Date: Tue, 7 Jul 2020 11:36:19 -0700
Subject: [PATCH 1/3] libavutil/imgutils: add utility to get plane sizes
This utility helps avoid undefined behavior
On Tue, Jul 7, 2020 at 4:35 AM Michael Niedermayer
wrote:
[...]
> I wonder if linesizes for newly added functions should be ptrdiff_t
> this would add some type converting loops though
>
> And size probably should be ptrdiff_t or int64_t to similarly be more future
> proof
Can these values be neg
On Tue, Jul 7, 2020 at 6:34 AM James Almer wrote:
>
> If i understand this right, you could easily solve it with just the
> following changes:
>
> > diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
> > index 7f9c1b632c..48a373db01 100644
> > --- a/libavutil/imgutils.c
> > +++ b/libavutil/i
It looks like this check was added in clang 10 (
https://reviews.llvm.org/D67122)
On Thu, Jul 2, 2020 at 8:06 AM Michael Niedermayer
wrote:
> On Wed, Jul 01, 2020 at 11:14:13AM -0700, Brian Kim wrote:
> > While running under Clang's UndefinedBehaviorSanitizer, I found a f
ering if there was interest in avoiding it?
I've attached a patch to expose some extra utilities and avoid passing in
the null pointer, but is this an appropriate way to work around it?
Thank you,
Brian
From 9db97425b2b3ca0913b7ce8f6f7c096a8aa5c964 Mon Sep 17 00:00:00 2001
From: Brian Kim
14 matches
Mail list logo