[asterisk-bugs] [JIRA] (ASTERISK-24197) Signed integer overflow in string hash functions

Diederik de Groot (JIRA) noreply at issues.asterisk.org
Mon Aug 11 03:08:29 CDT 2014


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

Diederik de Groot commented on ASTERISK-24197:
----------------------------------------------

After rechecking the code again, i have to admit you are right. 

> Signed integer overflow in string hash functions
> ------------------------------------------------
>
>                 Key: ASTERISK-24197
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24197
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 12.4.0
>            Reporter: Diederik de Groot
>            Assignee: Diederik de Groot
>            Severity: Minor
>
> the strings.h functions:
> ast_str_hash
> ast_str_hash_add
> ast_str_case_hash
> All suffer from signed integer overflow depending on the length of the string and the previous hash value calculated, because the bounds for the int are not checked. 
> 193416315 * 33 cannot be represented in type 'int'



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



More information about the asterisk-bugs mailing list