rapp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Rapp-dev] [PATCH] Correct validation on double operand functions in


From: Hans-Peter Nilsson
Subject: Re: [Rapp-dev] [PATCH] Correct validation on double operand functions in rapp_pixop
Date: Wed, 2 Sep 2020 23:24:13 +0200

> From: Mikael Pendse <mikpen@axis.com>
> Date: Wed, 2 Sep 2020 10:15:14 +0200

> Before the dst buffer was checked twice and the src buffer never.
> Validating both once seemed more fair.

Or in other words, quite a big copy-pasto.  Thanks!

The implications are that the source argument isn't checked for
alignment, as the rest of the RAPP_VALIDATE_U8 expression is redundant.

While (fixing) this *could* mean existing code may start failing, only
incorrect usage using unaligned source buffers is affected, that just
accidentally work, clearly violiating the documented API that requires
that these buffers are aligned.

Apparently the test-suite has gaps; this should be covered by an
additional "if" or two in test/rapp_test_pixop.c ...which seems to be
completely missing alignments checks.

I'll add that but you're very welcome with an additional patch, one that
would exposing each missing check.  I think just an extra "if" checking
src *and* dst aligmnent in rapp_test_pixop_driver2 would do.  Perhaps
outside the iteration.

...gosh, we're *completely* missing coverage in the test-suite for the
driver alignment checking (not just these functions), unlike coverage
for the non-overlap-checking.

brgds, H-P



reply via email to

[Prev in Thread] Current Thread [Next in Thread]