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 - Missing error checking in testaudioinfo and testaudiohotplug
Summary: Missing error checking in testaudioinfo and testaudiohotplug
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-07 17:40 UTC by Simon Hug
Modified: 2016-10-01 19:30 UTC (History)
0 users

See Also:


Attachments
Patch that adds some error checking and fixes an access violation issue. (3.81 KB, patch)
2016-05-07 17:40 UTC, Simon Hug
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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