Skip to content

Commit 4708190

Browse files
committed
app_sms: Ignore false positive stringop-overflow warning.
Ignore gcc warning about writing 32 bytes into a region of size 6, since we check that we don't go out of bounds for each byte. Resolves: asterisk#1088
1 parent 198b01c commit 4708190

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/app_sms.c

+3
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,10 @@ static int packsms8(unsigned char *o, int udhl, unsigned char *udh, int udl, uns
467467
if (u < 0 || u > 0xFF) {
468468
return -1; /* not valid */
469469
}
470+
#pragma GCC diagnostic push
471+
#pragma GCC diagnostic ignored "-Wstringop-overflow"
470472
o[p++] = u;
473+
#pragma GCC diagnostic pop
471474
if (p >= SMSLEN_8) {
472475
return p;
473476
}

0 commit comments

Comments
 (0)