https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243136

            Bug ID: 243136
           Summary: factor(6) gives inconsistent results with and without
                    OpenSSL compiled int
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: b...@freebsd.org
          Reporter: ka...@freebsd.org

Created attachment 210487
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=210487&action=edit
patch to fix the bug

See the eamil thread that starts here:

https://lists.freebsd.org/pipermail/freebsd-current/2019-December/075018.html

Basically, compiling with -DWITH_OPENSSL and -DWITHOUT_OPENSSL generates a
binary for factor(6), which gives inconsistent results for hexadecimal input. 
The patch fixes the problem.

Here's a svn log entry.

* usr.bin/factor/factor.6:
  . Update documentation to note that hexadecimal strings are accepted.
  . Document that a hexadecimal number can have an optional 0x or 0X prefix.
  . Document that a 0 value in interactive mode terminates factor(6).
  . Fix the maximum value for 'stop' in primes(6).
  . While here, spell "white-space" as "whitespace" and "non-digit" as
    "nondigit".

* usr.bin/factor/factor.c:
  . Include stdbool to get acces to bool type.
  . Use consistent style for function prototypes.
  . New function. is_hex_str() looks for the longest substring and 
    determines if it is a hexadecimal number.
  . New function.  Factor (pun intended) out common code into convert_str2bn().
  . For the WIHTOUT_OPENSSL case, make BN_dec2bn() and BN_hex2bn() return 0
    on error like their OpenSSL counterparts.

* usr.bin/primes/primes.c:
  . Fix comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to