Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CID 1645070 src/htx.c null pointer dereference suspected by coverity #3279

@chipitsine

Description

@chipitsine

Tool Name and Version

coverity

Code Report

first detected on 19 Feb 2026
reported for the first time

 40struct htx_blk *htx_defrag(struct htx *htx, struct htx_blk *blk, uint32_t blkinfo)
 41{
     	1. returned_null: get_trash_chunk_sz returns NULL (checked 15 out of 18 times).[show details]
     	2. var_assigned: Assigning: chunk = NULL return value from get_trash_chunk_sz.
 42        struct buffer *chunk = get_trash_chunk_sz(htx->size+sizeof(struct htx));
     	
CID 1645070: (#1 of 1): Dereference null return value (NULL_RETURNS)
3. dereference: Dereferencing a pointer that might be NULL chunk when calling htxbuf.[show details]
 43        struct htx *tmp = htxbuf(chunk);
 44        struct htx_blk *newblk, *oldblk;

Additional Information

No response

Output of haproxy -vv

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: code-reportThis issue describes a code report (like valgrind or coverity)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions