Opened 5 months ago

Closed 5 months ago

#30180 closed defect (fixed)

CID 1444641: REVERSE_INULL in test_hs_cache.c

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: dgoulet-merge
Cc: Actual Points: 0
Parent ID: Points: 0
Reviewer: asn Sponsor:

Description

Just reported today.

** CID 1444641:  Null pointer dereferences  (REVERSE_INULL)
/src/test/test_hs_cache.c: 265 in helper_fetch_desc_from_hsdir()
259                             &received_desc, &body_used, HS_DESC_MAX_LEN, 0);
260         tor_free(headers);
261       }
262     
263      done:
264       tor_free(hsdir_query_str);
>>>     CID 1444641:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "conn" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
265       if (conn)
266         connection_free_minimal(TO_CONN(conn));
267     
268       return received_desc;
269     }
270     

Child Tickets

Change History (6)

comment:1 Changed 5 months ago by nickm

Actual Points: 0

See branch ticket30180 with PR at https://github.com/torproject/tor/pull/943 .

This is not actually a bug, so I recommend no backport.

comment:2 Changed 5 months ago by nickm

Status: assignedneeds_review

comment:3 Changed 5 months ago by asn

Reviewer: asn

comment:4 Changed 5 months ago by asn

Status: needs_reviewmerge_ready

LGTM!

comment:5 Changed 5 months ago by nickm

Keywords: dgoulet-merge added

comment:6 Changed 5 months ago by dgoulet

Resolution: fixed
Status: merge_readyclosed

Merged!

Note: See TracTickets for help on using tickets.