Date: Mon, 06 Jan 2020 20:03:53 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 243136] factor(6) gives inconsistent results with and without OpenSSL compiled int Message-ID: <bug-243136-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243136 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: bugs@FreeBSD.org Reporter: kargl@FreeBSD.org Created attachment 210487 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D210487&action= =3Dedit patch to fix the bug See the eamil thread that starts here: https://lists.freebsd.org/pipermail/freebsd-current/2019-December/075018.ht= ml Basically, compiling with -DWITH_OPENSSL and -DWITHOUT_OPENSSL generates a binary for factor(6), which gives inconsistent results for hexadecimal inpu= t.=20 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=20 determines if it is a hexadecimal number. . New function. Factor (pun intended) out common code into convert_str2b= n(). . 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. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-243136-227>