Skip to content

Fix nil pointer dereference in SavePageData - #64

Merged
Runaho merged 1 commit into
developfrom
fix/alienvault-savepagedata-nil
May 28, 2026
Merged

Runaho merged 1 commit into
developfrom
fix/alienvault-savepagedata-nil

Conversation

@Runaho

@Runaho Runaho commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes nil pointer dereference at when returns for a missing meta file.

Root Cause

returns when the meta file doesn't exist yet. The existing code only checked for and proceeded with a nil pointer, causing a panic when accessing .

Fix

Changed the nil check from:

to:

This ensures a fresh is created when the file doesn't exist yet.

Testing

  • passes
  • Branch pushed to

When loadPageMetadata returns (nil, nil) because the meta file doesn't
exist, SavePageData would proceed with a nil meta pointer, causing a nil
pointer dereference at line 84 when appending to meta.Pages.

Added nil check after loadPageMetadata to handle the case where the file
doesn't exist yet - in that case we create a fresh PageMetadata with
Status set to 'in_progress'.
Copilot AI review requested due to automatic review settings May 28, 2026 07:32
@Runaho
Runaho merged commit 3812f0b into develop May 28, 2026
1 check failed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Runaho
Runaho deleted the fix/alienvault-savepagedata-nil branch May 28, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants