[asterisk-dev] [Code Review] 3356: Logic error in callerid checksum processing

rmudgett reviewboard at asterisk.org
Fri Mar 14 13:18:43 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3356/#review11208
-----------------------------------------------------------



/branches/1.8/main/callerid.c
<https://reviewboard.asterisk.org/r/3356/#comment20841>

    I would be surprised if this worked for calls that the checksum was not zero.
    
    I think the expression should be:
    
    if ((b + cid->cksum) & 0xff)
    
    Otherwise you have a more likely overflow when the message bytes sum to larger than 8 bits.


- rmudgett


On March 14, 2014, 12:10 p.m., rmeyerriecks wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3356/
> -----------------------------------------------------------
> 
> (Updated March 14, 2014, 12:10 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: asterisk-23488
>     https://issues.asterisk.org/jira/browse/asterisk-23488
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Callerid checksum-ing is being handled incorrectly here. When the checksum is calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This value will then fail the otherwise correct callerid message. It was intended for devices on the rx side to simply add the calculated checksum to the transmitted 2's compliment checksum. A much simpler operation.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/callerid.c 410575 
> 
> Diff: https://reviewboard.asterisk.org/r/3356/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> rmeyerriecks
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140314/a1a33e84/attachment.html>


More information about the asterisk-dev mailing list