Skip to content

Log fix msg handling#34

Merged
allenrobel merged 2 commits into
mainfrom
log-fix-msg-handling
Oct 11, 2025
Merged

Log fix msg handling#34
allenrobel merged 2 commits into
mainfrom
log-fix-msg-handling

Conversation

@allenrobel

Copy link
Copy Markdown
Owner

Fix corner-case where we might appended to an uninitialized string.

validate_logging_config(): fix case where we were appending to msg rather than initializing it.
@allenrobel allenrobel self-assigned this Oct 11, 2025
@allenrobel
allenrobel requested a review from Copilot October 11, 2025 00:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Fix corner-case where message handling could append to an uninitialized string variable. The PR addresses a potential bug where the msg variable might be referenced before assignment in the logging configuration validation logic.

  • Initializes msg variable to empty string at function start
  • Refactors message building logic to ensure proper initialization
  • Reorders operations to fix potential undefined variable reference

Comment thread lib/nd_python/common/log_v2.py
@allenrobel
allenrobel merged commit 80f5234 into main Oct 11, 2025
11 checks passed
@allenrobel
allenrobel deleted the log-fix-msg-handling branch October 11, 2025 01:04
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