Merge pull request #1069 from gglluukk/v5.6.4.2

Pragma GCC < 11 warning fix for -Wstringop-overread
pull/1054/head
Christian Bremvåg 2023-04-23 18:20:44 +02:00 committed by GitHub
commit ccda185731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -137,9 +137,13 @@ static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_ta
/* have a room for new tag */
memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length));
ph->length = htons(ntohs(ph->length) + data_len);
#pragma GCC diagnostic ignored "-Wstringop-overread"
#if (defined __GNUC__) && (__GNUC__ > 10)
#pragma GCC diagnostic ignored "-Wstringop-overread"
#endif
memcpy((unsigned char *)ph->tag, tag, data_len);
#pragma GCC diagnostic pop
#if (defined __GNUC__) && (__GNUC__ > 10)
#pragma GCC diagnostic pop
#endif
return data_len;
}