Bug #1470

strtol doesn't set errno = EINVAL if conversion failed

Added by Yuri Pankov over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2011-09-05
Priority:Low Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:-
Difficulty:Bite-size Tags:needs-triage

Description

strtol doesn't set errno = EINVAL if conversion failed, while http://pubs.opengroup.org/onlinepubs/009695399/functions/strtol.html specifies that errno may be set - we do that if base is invalid, and we could do that in the case when conversion couldn't be performed.

History

Updated by Gordon Ross over 2 years ago

  • Status changed from New to Resolved
changeset:   13478:b5ecd19f36a6
user:        Yakov Zaytsev <zaytsev.yakov@gmail.com>
date:        Wed Oct 05 05:23:02 2011 -0700
description:
        1470 strtol doesn't set errno = EINVAL if conversion failed
        Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
        Reviewed by: Jason King <jason.brian.king@gmail.com>
        Reviewed by: Gary Mills <mills@cc.umanitoba.ca>
        Reviewed by: Garrett D'Amore <garrett.damore@gmail.com>
        Approved by: Eric Schrock <Eric.Schrock@delphix.com>

Also available in: Atom PDF