LDAP.Client.First_Attribute does not check for Null_Ptr
Nobody has claimed this yet.
- Dominant language
- Ada
- Stars
- 162
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
The LDAP.Client.First_Attribute function does not check for the Interfaces.C.Strings.Null_Ptr return value in case there are no attributes in the LDAP message.
Therefore it dereferences a nullptr in that case.
This also affects the LDAP.Client.For_Every_Attribute procedure, utilizing this function.
LDAP.Client.Next_Attribute seems to be correct.
Kind regards
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating LDAP.Client.First_Attribute and inspect how it handles Interfaces.C.Strings.Null_Ptr when an LDAP message has no attributes. Verify the related LDAP.Client.For_Every_Attribute path, and consider the issue done when neither path dereferences a null pointer while LDAP.Client.Next_Attribute remains correct.
Written by the indexing model from the issue text.
Assessment
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100