Skip to content

Zend: Fix SIZEOF_POINTER_TYPE warnings in zend_observer.c#22054

Open
crystarm wants to merge 1 commit into
php:masterfrom
crystarm:zend-observer-sizeof-pointer-type
Open

Zend: Fix SIZEOF_POINTER_TYPE warnings in zend_observer.c#22054
crystarm wants to merge 1 commit into
php:masterfrom
crystarm:zend-observer-sizeof-pointer-type

Conversation

@crystarm
Copy link
Copy Markdown

This PR fixes two SIZEOF_POINTER_TYPE static analysis warnings in Zend/zend_observer.c.

  • In zend_observer_remove_handler(), the memmove() size argument now uses sizeof(void *) instead of sizeof(cur_handler).
  • In zend_observer_add_end_handler(), the memmove() size argument now uses sizeof(zend_observer_fcall_end_handler) instead of sizeof(end_handler).

This makes the byte count explicitly based on the moved element type rather than the pointer variable type.

No functional behavior change is intended.

Static analyzer findings addressed:
SIZEOF_POINTER_TYPE zend_observer.c:[160:6].log
SIZEOF_POINTER_TYPE zend_observer.c:[198:3].log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant