You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/12/31 21:46:51 UTC

[jira] [Commented] (TS-2457) isnan called on atoi - undefined behaviour

    [ https://issues.apache.org/jira/browse/TS-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13859686#comment-13859686 ] 

ASF subversion and git services commented on TS-2457:
-----------------------------------------------------

Commit 47982165a1f1beb0bb3d8145fcdf8447f59dbcad in branch refs/heads/master from [~hsn]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=4798216 ]

TS-2457 Protocol.c: change usage of atoi to strtol.


> isnan called on atoi - undefined behaviour
> ------------------------------------------
>
>                 Key: TS-2457
>                 URL: https://issues.apache.org/jira/browse/TS-2457
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Plugins, Quality
>            Reporter: Radim Kolar
>            Assignee: Leif Hedstrom
>             Fix For: 4.2.0
>
>         Attachments: patch-protocol-atoi
>
>
> found by clang analyzer
> !isnan(atoi(argv[2])) results in undefined behaviour.
> Fix: use strtol, replacement for atoi with error checking and more input format support. can do octal and hexadecimal input out of the box



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)