[asterisk-bugs] [JIRA] (PRI-145) Unchecked write in pritest

SirLouen (JIRA) noreply at issues.asterisk.org
Fri Dec 14 11:40:45 CST 2012


    [ https://issues.asterisk.org/jira/browse/PRI-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200721#comment-200721 ] 

SirLouen commented on PRI-145:
------------------------------

This patch works, but I believe must be solved. I've tried to install today libpri under Ubuntu 12.10 Server and found this problem also
                
> Unchecked write in pritest
> --------------------------
>
>                 Key: PRI-145
>                 URL: https://issues.asterisk.org/jira/browse/PRI-145
>             Project: LibPRI
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 1.4.13
>         Environment: Debian 7.0 (Wheezy)
>            Reporter: Tzafrir Cohen
>            Assignee: Richard Mudgett
>            Severity: Minor
>         Attachments: fix_unused_write.patch
>
>
> Building libpri with the right build flags fails:
> gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -fPIC  -O2  -MD -MT pritest.o -MF .pritest.o.d -MP -c -o pritest.o pritest.c
> pritest.c: In function 'do_channel':
> pritest.c:71:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
> Attached a patch to check the output of write(2) and exit the main loop of pri_test in case of a failed write.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list