Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c669685acc9e9b2fcd4773f97478e9502b7ede7a
      
https://github.com/WebKit/WebKit/commit/c669685acc9e9b2fcd4773f97478e9502b7ede7a
  Author: David Kilzer <[email protected]>
  Date:   2025-10-30 (Thu, 30 Oct 2025)

  Changed paths:
    M Source/WebCore/PAL/ThirdParty/dav1d/src/decode.c
    M Source/WebCore/PAL/ThirdParty/dav1d/src/thread_task.c

  Log Message:
  -----------
  Fix untyped malloc() calls in third-party dav1d project
<https://bugs.webkit.org/show_bug.cgi?id=301675>
<rdar://163688955>

Reviewed by Geoffrey Garen.

Use sizeof() in the function parameter list when computing size for
malloc() and realloc() to fix untyped calls.

* Source/WebCore/PAL/ThirdParty/dav1d/src/decode.c:
(dav1d_decode_frame_init):
- Multiply size by sizeof(*f->lf.tx_lpf_right_edge[0]) which is
  sizeof(uint8_t) which is 1 to fix the bug.
* Source/WebCore/PAL/ThirdParty/dav1d/src/thread_task.c:
(create_filter_sbrow):
(dav1d_task_create_tile_sbrow):
- Move the assignment of `size` inside the realloc() calls so we don't
  duplicate the calculation, but still provide a type hint to the
  compiler.
- Switch from sizeof(Dav1dTask) to sizeof(*tasks) so we don't duplicate
  the type.

Canonical link: https://commits.webkit.org/302369@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to