Revision: 9102
http://playerstage.svn.sourceforge.net/playerstage/?rev=9102&view=rev
Author: jpgr87
Date: 2012-09-08 00:54:35 +0000 (Sat, 08 Sep 2012)
Log Message:
-----------
Applied patch #3555122: double-free issue fixed in powershot driver
Modified Paths:
--------------
code/player/trunk/server/drivers/camera/powershot/powershot.cc
Modified: code/player/trunk/server/drivers/camera/powershot/powershot.cc
===================================================================
--- code/player/trunk/server/drivers/camera/powershot/powershot.cc
2012-07-31 04:21:47 UTC (rev 9101)
+++ code/player/trunk/server/drivers/camera/powershot/powershot.cc
2012-09-08 00:54:35 UTC (rev 9102)
@@ -1280,6 +1280,7 @@
{
if (this->imgData.image) free(this->imgData.image);
this->imgData.image_count = 0;
+ this->imgData.image = NULL;
continue;
}
if (!(IS_JPEG(this->imgData.image)))
@@ -1411,7 +1412,7 @@
if (i != nblocks)
{
PLAYER_ERROR("cannot get image (ptp_canon_getpartialobject)");
- free(this->imgData.image);
+ if (this->imgData.image) free(this->imgData.image);
this->imgData.image_count = 0;
this->imgData.image = NULL;
continue;
@@ -1425,7 +1426,7 @@
if (image) free(image);
image = NULL;
PLAYER_ERROR("cannot get image tail (ptp_canon_getpartialobject)");
- free(this->imgData.image);
+ if (this->imgData.image) free(this->imgData.image);
this->imgData.image_count = 0;
this->imgData.image = NULL;
continue;
@@ -1433,7 +1434,7 @@
if (!image)
{
PLAYER_ERROR("cannot get image tail (NULL image)");
- free(this->imgData.image);
+ if (this->imgData.image) free(this->imgData.image);
this->imgData.image_count = 0;
this->imgData.image = NULL;
continue;
@@ -1443,7 +1444,7 @@
PLAYER_ERROR("cannot get image tail (wrong chunk size)");
free(image);
image = NULL;
- free(this->imgData.image);
+ if (this->imgData.image) free(this->imgData.image);
this->imgData.image_count = 0;
this->imgData.image = NULL;
continue;
@@ -1457,14 +1458,14 @@
if (!(IS_JPEG(this->imgData.image)))
{
PLAYER_ERROR("not a JPEG image");
- free(this->imgData.image);
+ if (this->imgData.image) free(this->imgData.image);
this->imgData.image_count = 0;
this->imgData.image = NULL;
continue;
}
if (Powershot::image_size_from_exif(&(this->imgData)))
{
- free(this->imgData.image);
+ if (this->imgData.image) free(this->imgData.image);
this->imgData.image_count = 0;
this->imgData.image = NULL;
continue;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit