diff --git a/spa/include/spa/pod/parser.h b/spa/include/spa/pod/parser.h index 59987e232..e0546751f 100644 --- a/spa/include/spa/pod/parser.h +++ b/spa/include/spa/pod/parser.h @@ -91,7 +91,7 @@ spa_pod_parser_deref(struct spa_pod_parser *parser, uint32_t offset, uint32_t si * Check that the pointer is aligned and that the size (rounded * to the next multiple of 8) is in bounds. */ - if (SPA_IS_ALIGNED(pod, 8) && + if (SPA_IS_ALIGNED(pod, __alignof__(struct spa_pod)) && long_offset + SPA_ROUND_UP_N((uint64_t)SPA_POD_BODY_SIZE(pod), 8) <= size) return (struct spa_pod *)pod; }