From 3935e94f01246cb101e19596a650e2cd6578078f Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 8 Apr 2018 15:44:35 -0400 Subject: static_assert PNG header size in pngo and glitch --- bin/glitch.c | 1 + bin/pngo.c | 1 + 2 files changed, 2 insertions(+) (limited to 'bin') diff --git a/bin/glitch.c b/bin/glitch.c index 22d82c13..71664115 100644 --- a/bin/glitch.c +++ b/bin/glitch.c @@ -127,6 +127,7 @@ static struct PACKED { uint8_t filter; uint8_t interlace; } header; +static_assert(13 == sizeof(header), "header size"); static size_t lineSize(void) { switch (header.color) { diff --git a/bin/pngo.c b/bin/pngo.c index 7ca2d949..0859f1d6 100644 --- a/bin/pngo.c +++ b/bin/pngo.c @@ -132,6 +132,7 @@ static struct PACKED { enum PACKED { ADAPTIVE } filter; enum PACKED { PROGRESSIVE, ADAM7 } interlace; } header; +static_assert(13 == sizeof(header), "header size"); static size_t lineSize(void) { switch (header.color) { -- cgit 1.4.1