AdaCore / AdaCore/aws

LDAP.Client.First_Attribute does not check for Null_Ptr

Open
#196 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.