Project

General

Profile

Actions

Bug #1470

closed

strtol doesn't set errno = EINVAL if conversion failed

Added by Yuri Pankov over 12 years ago. Updated about 12 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
Gerrit CR:
External Bug:

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 performedNewGergő Mihály Doma2019-07-05

Actions
Actions #1

Updated by Gordon Ross about 12 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>
Actions #2

Updated by Gergő Mihály Doma over 4 years ago

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

Also available in: Atom PDF