Summary: | sys-libs/glibc [s]scanf : "%u" format specifier should not accept negative integers | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Christopher Friedt <chrisfriedt> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED UPSTREAM | ||
Severity: | minor | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Christopher Friedt
2012-05-16 19:11:01 UTC
seems to me it's acting correctly according to POSIX. http://pubs.opengroup.org/onlinepubs/9699919799/functions/scanf.html u Matches an optionally signed decimal integer, whose format is the same as expected for the subject sequence of strtoul() with the value 10 for the base argument. In the absence of a size modifier, the application shall ensure that the corresponding argument is a pointer to unsigned. http://pubs.opengroup.org/onlinepubs/9699919799/functions/strtoul.html The subject sequence is defined as the longest initial subsequence of the input string, starting with the first non-white-space character that is of the expected form. The subject sequence shall contain no characters if the input string is empty or consists entirely of white-space characters, or if the first non-white-space character is other than a sign or a permissible letter or digit. if you want to dispute that, feel free to bring it to the upstream mailing list and/or bugzilla as i don't plan on doing anything unique here ... |