[Rpm-maint] [PATCH 5/5] Fix handling of zero-length file digests
pmatilai at laiskiainen.org
Thu Apr 28 06:20:31 UTC 2016
On 04/27/2016 11:00 PM, Stefan Berger wrote:
> "Rpm-maint" <rpm-maint-bounces at lists.rpm.org> wrote on 04/27/2016
> 05:45:56 AM:
>> I get the following warning:
>> ima.c:23:1: warning: ‘PACKED’ attribute directive ignored [-Wattributes]
>> } __attribute__((PACKED));
>> May be there is an simpler way to check for the header being zeros only?
> One way of doing it would be to create an array of 9 zero bytes (with a
> comment of what it represents) and compare against that.
Yes, and there's precedent for that in rpm, at least:
> I guess you wouldn't like gcc #pragma tricks to disable -Wattributes in
> this case.
Compiler specifics are nasty, no need for that here because there's a
simple, standard solution.
- Panu -
More information about the Rpm-maint