This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 00d1f41b2e swscale/ops_backend: avoid UB (null pointer arithmetic)
00d1f41b2e is described below
commit 00d1f41b2eb070803a927c6132c240e14142d0b9
Author: Niklas Haas <[email protected]>
AuthorDate: Sun Mar 15 12:21:00 2026 +0100
Commit: Niklas Haas <[email protected]>
CommitDate: Tue Mar 24 13:20:59 2026 +0000
swscale/ops_backend: avoid UB (null pointer arithmetic)
Just use uintptr_t, it accomplishes the exact same thing while being defined
behavior.
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <[email protected]>
---
libswscale/ops_backend.h | 4 ++--
libswscale/ops_tmpl_common.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libswscale/ops_backend.h b/libswscale/ops_backend.h
index 6ece263178..beff0193a6 100644
--- a/libswscale/ops_backend.h
+++ b/libswscale/ops_backend.h
@@ -44,8 +44,8 @@
* directly incremented by the corresponding read/write functions.
*/
typedef struct SwsOpIter {
- const uint8_t *in[4];
- uint8_t *out[4];
+ uintptr_t in[4];
+ uintptr_t out[4];
int x, y;
} SwsOpIter;
diff --git a/libswscale/ops_tmpl_common.c b/libswscale/ops_tmpl_common.c
index 1f3eb6aa67..e95a164ccf 100644
--- a/libswscale/ops_tmpl_common.c
+++ b/libswscale/ops_tmpl_common.c
@@ -187,8 +187,8 @@ static void fn(process)(const SwsOpExec *exec, const void
*priv,
SwsOpIter iterdata;
SwsOpIter *iter = &iterdata; /* for CONTINUE() macro to work */
for (int i = 0; i < 4; i++) {
- iter->in[i] = exec->in[i];
- iter->out[i] = exec->out[i];
+ iter->in[i] = (uintptr_t) exec->in[i];
+ iter->out[i] = (uintptr_t) exec->out[i];
}
for (iter->y = y_start; iter->y < y_end; iter->y++) {
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]