[Asterisk-code-review] main/say: Work around gcc 9 format-truncation false positive (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Tue Jun 23 09:24:47 CDT 2020


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14501 )

Change subject: main/say: Work around gcc 9 format-truncation false positive
......................................................................


Patch Set 1: Code-Review+1

> Patch Set 1:
> 
> > I find it odd it's not complaining about the other similar conversions. For instance another exact same snprintf is just a few lines below this one in another "if".
> 
> Yea.. so, not sure what to say.
> 
> As the commit message says: the compiler is clearly wrong.
> 
> But this wouldn't be the first place where we do a slight tweak to overcome false positives.
> 
> I'll leave it for you guys to decide what to do.

I wasn't sure if we wanted to increase the size of the buffer, and 'n' value in order to "fix" all and potentially avoid future problems/tweaks. But you're right in that the code indeed constrains things appropriately, and probably no reason to fix more than we should at this time unless you want to.

That said I'm fine with this going in as is.


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14501
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ic7a70120188c9aa525a6d70289385bfce878438a
Gerrit-Change-Number: 14501
Gerrit-PatchSet: 1
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Tue, 23 Jun 2020 14:24:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200623/10ed3ca6/attachment.html>


More information about the asterisk-code-review mailing list