Files
coreutils/src
Pádraig Brady 024a1d572c factor: fix integer validation and GMP fallback
In the recent factor rewrite, the GMP code
wasn't actually used; just an error was printed
on integer overflow.  While fixing that it was noticed
that correct input validation wasn't done in all cases
when falling back to the GMP code.

* src/factor.c (print_factors) Fallback to GMP on overflow.
(strto2uintmax): Scan the string for invalid characters,
so that case can be detected independently of overflow.
Return an error when an empty string is passed.
Also allow leading spaces and '+' in input numbers.
* tests/misc/factor.pl: Ensure the GMP code is exercised
when compiled in. Also add a test to verify leading
spaces and '+' are allowed.
2012-10-09 00:07:35 +01:00
..
2012-05-08 02:18:39 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-05-08 02:18:39 +01:00
2012-09-28 12:21:02 +02:00
2012-09-28 12:21:02 +02:00
2008-11-20 10:21:52 +01:00
2012-09-28 12:21:02 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-05-08 02:18:39 +01:00
2005-07-18 07:52:37 +00:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2003-07-06 06:08:40 +00:00
2012-01-27 11:35:24 +01:00
2012-03-22 20:51:20 +00:00
…
…
…
2012-01-27 11:35:24 +01:00
2012-09-28 12:21:02 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-05-10 11:02:42 +02:00
2012-01-27 11:35:24 +01:00
2012-07-15 19:11:45 +02:00
2012-05-08 02:18:39 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-08-04 11:32:01 +02:00
2012-09-23 09:17:46 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-05-08 02:18:39 +01:00
2012-08-03 14:54:01 +02:00
2012-01-27 11:35:24 +01:00
2012-05-08 02:18:39 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2007-07-10 19:00:00 +02:00
2007-07-10 19:00:00 +02:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-01-27 11:35:24 +01:00
2012-07-15 19:11:45 +02:00
2012-01-27 11:35:24 +01:00