Skip to content

Commit

Permalink
proto_msrp: Fix gcc-10 false positive on ubuntu-20.04
Browse files Browse the repository at this point in the history
In function ‘memcpy’, inlined from ‘_ident_builder.constprop’
at msrp_signaling.c:1198:3:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error:
‘__builtin___memcpy_chk’ writing 32 bytes into a region of size 18
overflows the destination [-Werror=stringop-overflow=]

   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(cherry picked from commit da3782e)
  • Loading branch information
liviuchircu committed Jul 14, 2022
1 parent 03d64b9 commit 2918200
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/proto_msrp/msrp_signaling.c
Expand Up @@ -1158,7 +1158,7 @@ static char * _ident_builder( unsigned short hash, unsigned short idx,
{
#define IDENT_BUF_MAX_LEN 20
/* format is hash_hexa.idx_hexa.rand_hexa.padding , max 20 chars*/
static char ident_s[IDENT_BUF_MAX_LEN + 1];
static char ident_s[IDENT_BUF_MAX_LEN + 1 + MD5_LEN /*fix gcc warn*/];
unsigned short rnd;
int size;
char *p;
Expand Down

0 comments on commit 2918200

Please sign in to comment.