Skip to content

model loading error handling in denoise.c#271

Open
orvitpng wants to merge 2 commits into
xiph:mainfrom
orvitpng:denoise-fix
Open

model loading error handling in denoise.c#271
orvitpng wants to merge 2 commits into
xiph:mainfrom
orvitpng:denoise-fix

Conversation

@orvitpng

Copy link
Copy Markdown

This patch improves RNN model loading functions by:

  • Checking allocation return values before use
  • Validating file handles
  • Rejecting overly large file sizes (i.e., > INT_MAX)
  • Handling malloc(0) explicitly

Functionality should remain the same, but this removes undefined or implementation-defined behaviors.

Comment thread src/denoise.c Outdated
Comment thread src/denoise.c Outdated
@jmvalin

jmvalin commented May 29, 2026

Copy link
Copy Markdown
Member

Hi, in general, please make sure that everything is strictly C90-compliant. I don't know that the rest of RNNoise is currently all fully C90, but I'm at least trying to get there.

@orvitpng orvitpng requested a review from jmvalin June 1, 2026 18:45
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.

3 participants