* [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror
@ 2024-02-17 17:09 Michael Niedermayer
2024-02-17 17:09 ` [FFmpeg-devel] [PATCH 2/2] swscale/swscale: Check srcSliceH for bayer Michael Niedermayer
2024-02-21 17:29 ` [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror Michael Niedermayer
0 siblings, 2 replies; 3+ messages in thread
From: Michael Niedermayer @ 2024-02-17 17:09 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: out of array read
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libswscale/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index ec822ff5d92..4dc0fbfefbf 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1885,7 +1885,7 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter,
}
for (i = 0; i < 4; i++)
- if (!FF_ALLOCZ_TYPED_ARRAY(c->dither_error[i], c->dstW + 2))
+ if (!FF_ALLOCZ_TYPED_ARRAY(c->dither_error[i], c->dstW + 3))
goto nomem;
c->needAlpha = (CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat) && isALPHA(c->dstFormat)) ? 1 : 0;
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] swscale/swscale: Check srcSliceH for bayer
2024-02-17 17:09 [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror Michael Niedermayer
@ 2024-02-17 17:09 ` Michael Niedermayer
2024-02-21 17:29 ` [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror Michael Niedermayer
1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2024-02-17 17:09 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Assertion srcSliceH > 1 failed at libswscale/swscale_unscaled.c:1359
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libswscale/swscale.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 46ba68fe6a6..7bea5147db1 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -904,7 +904,8 @@ static int scale_internal(SwsContext *c,
if ((srcSliceY & (macro_height_src - 1)) ||
((srcSliceH & (macro_height_src - 1)) && srcSliceY + srcSliceH != c->srcH) ||
- srcSliceY + srcSliceH > c->srcH) {
+ srcSliceY + srcSliceH > c->srcH ||
+ (isBayer(c->srcFormat) && srcSliceH <= 1)) {
av_log(c, AV_LOG_ERROR, "Slice parameters %d, %d are invalid\n", srcSliceY, srcSliceH);
return AVERROR(EINVAL);
}
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror
2024-02-17 17:09 [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror Michael Niedermayer
2024-02-17 17:09 ` [FFmpeg-devel] [PATCH 2/2] swscale/swscale: Check srcSliceH for bayer Michael Niedermayer
@ 2024-02-21 17:29 ` Michael Niedermayer
1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2024-02-21 17:29 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 454 bytes --]
On Sat, Feb 17, 2024 at 06:09:46PM +0100, Michael Niedermayer wrote:
> Fixes: out of array read
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libswscale/utils.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
will apply patchset
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-21 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17 17:09 [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror Michael Niedermayer
2024-02-17 17:09 ` [FFmpeg-devel] [PATCH 2/2] swscale/swscale: Check srcSliceH for bayer Michael Niedermayer
2024-02-21 17:29 ` [FFmpeg-devel] [PATCH 1/2] swscale/utils: Allocate more dithererror Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git