Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 1.54 KB

C_openldap.md

File metadata and controls

42 lines (24 loc) · 1.54 KB

openldap

Project Repo: https://github.com/openldap/openldap/tree/519e0c94c9f3804813f691de487283ad7586f510

Case 1

Program locations:

Bug traces:

  • < return ber_strdup_x( s, NULL );, ber_strdup>
  • <ber_strdup( urlstr ), ldif_open_url>
  • <s, ldap_pvt_hex_unescape>

Explanation:

  • The return value of ber_strdup_x containing NULL value is returned to the caller of function ber_strdup at line 4.
  • The NULL value of pointer p from line 32 is passed as argument.
  • The NULL value of parameter s at line 2 is dereferenced in the loop condition at line 11 without any NULL check.

Case 2

Program locations:

Bug traces:

  • <\treturn ber_strdup_x( s, NULL );, ber_strdup>
  • <ber_strdup( urlstr ), ldif_open_url>

Explanation:

  • The return value of ber_strdup_x is returned to the caller of function ber_strdup.\nThe NULL value from ber_strdup at line 32 propagates to pointer p, then to pointer s through strchr at line 37, and is dereferenced at line 38 without NULL check.