Even if _FORTIFY_SOURCE=2 is set, this patch allows for example:
struct { char header[4], payload[42], trailer[13]; } data;
n = read(fd, &data.payload, 42+13);
Same applies to fread() and memcpy(), memset(), ... .
The checks of other functions (str*(), *s*printf(), ...) are not affected.
Fr
This patch has no effect on generated code. See [PATCH 2/2] for use case.
From e7a3778a0db64fb6b9ba0bac8a225a73f45e9529 Mon Sep 17 00:00:00 2001
From: Christian Franke
Date: Wed, 9 Oct 2019 21:28:17 +0200
Subject: [PATCH 1/2] headers: _FORTIFY_SOURCE: Allow to limit level for
individual functio