Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2019 13:25:30 -0800
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        freebsd-current@freebsd.org
Subject:   OpenSSL breaks factor(6)
Message-ID:  <20191227212530.GA61314@troutmask.apl.washington.edu>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191227212530.GA61314>