OpenSSL breaks factor(6)
Steve Kargl
sgk at troutmask.apl.washington.edu
Fri Dec 27 21:25:33 UTC 2019
The use of OpenSSL in factor(6) breaks factor(6) with respect to
its documentation.
% man factor
...
Numbers may be preceded by a single '+'.
...
% factor +125
factor: +125: illegal numeric format.
without OpenSSL one gets
% factor +125
125: 5 5 5
Although undocumented, factor(6) seems to support hexidecimal
input, but does it?
% factor abc
2748: 2 2 3 229
% factor 1abc
1: 1
without OpenSSL one gets
% factor abc
2748: 2 2 3 229
% factor 1abc
6844: 2 2 29 59
The above behavior with OpenSSL appears to match the following
documentation:
% man factor
...
Numbers are terminated by a non-digit character (such as a newline).
except without OpenSSL, factor(6) produces
% factor 1abc
6844: 2 2 29 59
where 6844 is the decimal representation of 0x1abc.
But, one now finds
% factor 1abcp
factor: 1abcp: illegal numeric format.
so, factor(6) without OpenSSL does not terminate numbers with non-digit
characters.
--
Steve
20161221 https://www.youtube.com/watch?v=IbCHE-hONow
More information about the freebsd-current
mailing list