[asterisk-bugs] [JIRA] (ASTERISK-27630) [patch] editline: Avoid shifting a negative signed value.

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Mon Apr 1 13:21:56 CDT 2019


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Harwell updated ASTERISK-27630:
-------------------------------------

    Target Release Version/s: 16.3.0

> [patch] editline: Avoid shifting a negative signed value.
> ---------------------------------------------------------
>
>                 Key: ASTERISK-27630
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27630
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 13.19.0, 15.2.0
>            Reporter: Alexander Traud
>            Assignee: Alexander Traud
>            Severity: Minor
>              Labels: patch
>      Target Release: 13.20.0, 15.3.0, 16.0.0, 16.3.0
>
>         Attachments: libedit_left_shift_unsigned.patch
>
>
> On FreeBSD 11.1, the default compiler _clang_ (4.0.0) reports:{code}In file included from editline.c:8:
> ./el.c:173:21: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
>                         el->el_flags &= ~HANDLE_SIGNALS;
>                                         ~~~~~~~~~~~~~~~
> ./el.h:58:25: note: expaned from macro 'HANDLE_SIGNALS'
> #define HANDLE_SIGNALS  1<<0
>                          ^{code}This is an external library, which is still maintained: http://thrysoee.dk/editline/
> That upstream project is active, the last change happened just three weeks ago (officially it is called libedit 2.11). The copy within Asterisk is from 2002, libedit 2.6.
> The short-term workaround is to use the precompiled libedit of your Unix distribution, for example in Debian/Ubuntu: {{sudo apt install libedit-dev}}. As mid-term solution, I attached/backported the change from September 2003, which resolves the compiler issue above ([original source|http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/el.h.diff?r1=1.14&r2=1.15]).
> Although in Asterisk, that library has seen only 49 commits over the last 15 years, as long-term approach, that external library should be
> A) updated to the latest upstream version. Or
> B) removed and relied solely on precompiled Unix packages, see ASTERISK-18725.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list