Skip to content

Coding - Incorrect return-value check for a 'scanf'-like function#680

Merged
dpasukhi merged 1 commit into
Open-Cascade-SAS:IRfrom
dpasukhi:incorrectly-checked-scanf
Aug 17, 2025
Merged

Coding - Incorrect return-value check for a 'scanf'-like function#680
dpasukhi merged 1 commit into
Open-Cascade-SAS:IRfrom
dpasukhi:incorrectly-checked-scanf

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

Fix sscanf condition checks in iges_lire function for better error handling

Fix sscanf condition checks in iges_lire function for better error handling
@dpasukhi dpasukhi added this to the Release 8.0 milestone Aug 17, 2025
@dpasukhi dpasukhi requested a review from Copilot August 17, 2025 18:48
@dpasukhi dpasukhi self-assigned this Aug 17, 2025
@dpasukhi dpasukhi added the 1. Coding Coding rules, trivial changes and misprints label Aug 17, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes incorrect return value checks for sscanf calls in the iges_lire function to properly handle parsing errors when reading IGES file sections.

Key changes:

  • Corrected sscanf return value validation to check for exactly 1 successful conversion instead of checking for non-zero or zero returns
  • Ensures proper error handling when parsing numeric section identifiers from IGES file lines

Comment thread src/DataExchange/TKDEIGES/IGESFile/liriges.c
Comment thread src/DataExchange/TKDEIGES/IGESFile/liriges.c
@dpasukhi dpasukhi merged commit 5c87568 into Open-Cascade-SAS:IR Aug 17, 2025
23 checks passed
@dpasukhi dpasukhi deleted the incorrectly-checked-scanf branch August 17, 2025 20:01
@github-project-automation github-project-automation Bot moved this from Todo to Done in Maintenance Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Coding Coding rules, trivial changes and misprints

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants