Page MenuHome GnuPG

Generate new key, long passphrase trashes stack
Closed, ResolvedPublic

Description

Release: 0.7.0

Environment

Red Hat 9.0, x86

Description

When generating a new key, if the passphrase is longer than 256 characters gpa crashes with a segmentation fault and gdb shows the stack has been trashed.

Fix

Problem is in qdchkpwd(). It intends to assign to elements of the 256-element array hit_num the count of the corresponding characters in the passphrase. Instead it assigns to hit_num[i], where i varies from 0 up to the length of the passphrase.

Event Timeline

I just checked in a fix to CVS. The crash seems to be gone.

Thanks for the report.