crypt function cannot handle input phrase over 512 characters

Solution Verified - Updated -

Issue

  • crypt() function cannot handle strings longer than 512 characters
  • crypt or crypt_r returns error ERANGE "Numerical result out of range"

Environment

  • Red Hat Enterprise Linux 9
  • crypt from libxcrypt (not GNU glibc)
  • phrase argument longer than 512 bytes

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content