We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3322

Summary: Missing error checking in testaudioinfo and testaudiohotplug
Product: SDL Reporter: Simon Hug <chli.hug>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: Patch that adds some error checking and fixes an access violation issue.

Description Simon Hug 2016-05-07 17:40:14 UTC
Created attachment 2448 [details]
Patch that adds some error checking and fixes an access violation issue.

The two tests test/testaudioinfo.c and test/testaudiohotplug.c are missing error checking when they call SDL_GetAudioDeviceName. This function can return NULL which the tests pass straight to SDL_Log.

The attached patch adds some error checking and also fixes an access violation issue in testaudiohotplug.
Comment 1 Sam Lantinga 2016-10-01 19:30:13 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/636499ff46f8