Skip to content

Fix: Circular queue display function null pointer dereference (#871)#873

Merged
darshan2456 merged 3 commits into
darshan2456:mainfrom
Akshatshukla-25:feature/fix-circ-queue-null-dereference-bug2
Jul 17, 2026
Merged

Fix: Circular queue display function null pointer dereference (#871)#873
darshan2456 merged 3 commits into
darshan2456:mainfrom
Akshatshukla-25:feature/fix-circ-queue-null-dereference-bug2

Conversation

@Akshatshukla-25

Copy link
Copy Markdown
Contributor

Description

This PR addresses Bug 2 of issue #871. It adds a check to verify that queue_ptr->arr is not NULL before iterating and displaying elements inside display_circ_queue in src/data_structures/circular_queue.c.

Resolves

Changes

  • circular_queue.c: Added queue_ptr->arr == NULL validation inside display_circ_queue.
  • Makefile: Linked missing help objects to resolve test suite build errors (carried over to this branch).

Verification & Testing

  • Ran make fmt to ensure style consistency.
  • Compiled successfully via make.
  • Ran and passed all unit tests via make test.

@darshan2456
darshan2456 merged commit f2c37c3 into darshan2456:main Jul 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants