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 2098 - Pointer variable not initialized in IMG_SavePNG_RW()
Summary: Pointer variable not initialized in IMG_SavePNG_RW()
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-13 18:34 UTC by manuel.montezelo
Modified: 2013-09-28 06:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description manuel.montezelo 2013-09-13 18:34:04 UTC
Hi,

In line 618 of http://hg.libsdl.org/SDL_image/file/361ab0371a02/IMG_png.c
  void *png;

it's not initialized to =NULL, and possibly can be used without being initialized (or otherwise, the nearby check "if (png)" doesn't make much sense, I think).

Hope that helps.
Comment 1 Sam Lantinga 2013-09-28 06:51:42 UTC
Good catch!  This is fixed, thanks:
http://hg.libsdl.org/SDL_image/rev/00dd129031a1