[Asterisk-code-review] chan_dahdi.c: Resolve a format-truncation build warning. (asterisk[16])

Sean Bright asteriskteam at digium.com
Fri Aug 19 15:17:39 CDT 2022


Hello Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/18982

to look at the new patch set (#4).

Change subject: chan_dahdi.c: Resolve a format-truncation build warning.
......................................................................

chan_dahdi.c: Resolve a format-truncation build warning.

With gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0:

> chan_dahdi.c:4129:18: error: ā€˜%sā€™ directive output may be truncated
>   writing up to 255 bytes into a region of size between 242 and 252
>   [-Werror=format-truncation=]

This removes the error-prone sizeof(...) calculations in favor of just
doubling the size of the base buffer.

Change-Id: I2d276785286730d3d5d0a921bcea2e065dbf27c5
---
M channels/chan_dahdi.c
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/18982/4
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18982
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I2d276785286730d3d5d0a921bcea2e065dbf27c5
Gerrit-Change-Number: 18982
Gerrit-PatchSet: 4
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220819/957d6107/attachment.html>


More information about the asterisk-code-review mailing list