Project

General

Profile

Bug #1470

strtol doesn't set errno = EINVAL if conversion failed

Added by Yuri Pankov about 8 years ago. Updated almost 8 years ago.

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

0%

Estimated time:
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.


Related issues

Related to illumos gate - Bug #11326: libc: strtoul() forgets to set errno to EINVAL when no conversion could be performedNew2019-07-05

Actions

History

#1

Updated by Gordon Ross almost 8 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>
#2

Updated by Gergő Mihály Doma 3 months ago

  • Related to Bug #11326: libc: strtoul() forgets to set errno to EINVAL when no conversion could be performed added

Also available in: Atom PDF