[haiku-commits] haiku: hrev49357 - in src: kits/tracker libs/agg/src

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 3 Jul 2015 17:37:13 +0200 (CEST)

hrev49357 adds 3 changesets to branch 'master'
old head: b3f2ebf008490ab0b37e7d12fb6e2702f45bcd2b
new head: 8108282b325dba0e69234014f919486dc7d49977
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=8108282b325d+%5Eb3f2ebf00849

----------------------------------------------------------------------------

217e35d62437: FindPanel: Reorder operations to avoid leak

CID 1234656

03c41782bb45: agg: avoid writting beyond the array size

Potentially trying to add two new items to an array without enough room left.

CID 991455

8108282b325d: jpeg translator: exif_parser: Missing break statement

CID 1273786 and CID 1273787

[ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 11 insertions(+), 10 deletions(-)
src/add-ons/translators/jpeg/exif_parser.cpp | 1 +
src/kits/tracker/FindPanel.cpp | 18 +++++++++---------
src/libs/agg/src/agg_vcgen_dash.cpp | 2 +-

############################################################################

Commit: 217e35d62437f3fa7d2951a678bd7e0ce1df36aa
URL: http://cgit.haiku-os.org/haiku/commit/?id=217e35d62437
Author: Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date: Fri Jul 3 15:09:39 2015 UTC

FindPanel: Reorder operations to avoid leak

CID 1234656

----------------------------------------------------------------------------

diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp
index d8fd0fc..2fc4034 100644
--- a/src/kits/tracker/FindPanel.cpp
+++ b/src/kits/tracker/FindPanel.cpp
@@ -3177,20 +3177,20 @@ private:
void
DeleteTransientQueriesTask::StartUpTransientQueryCleaner()
{
+ TTracker* tracker = dynamic_cast<TTracker*>(be_app);
+ ASSERT(tracker != NULL);
+
+ if (tracker == NULL)
+ return;
// set up a task that wakes up when the machine is idle and starts
// killing off old transient queries
DeleteTransientQueriesFunctor* worker
= new DeleteTransientQueriesFunctor(new
DeleteTransientQueriesTask());

- TTracker* tracker = dynamic_cast<TTracker*>(be_app);
- ASSERT(tracker != NULL);
-
- if (tracker != NULL) {
- tracker->MainTaskLoop()->RunWhenIdle(worker,
- 30 * 60 * 1000000, // half an hour initial delay
- 5 * 60 * 1000000, // idle for five minutes
- 10 * 1000000);
- }
+ tracker->MainTaskLoop()->RunWhenIdle(worker,
+ 30 * 60 * 1000000, // half an hour initial delay
+ 5 * 60 * 1000000, // idle for five minutes
+ 10 * 1000000);
}



############################################################################

Commit: 03c41782bb4580b84cc34498b8ed66d11e37b995
URL: http://cgit.haiku-os.org/haiku/commit/?id=03c41782bb45
Author: Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date: Fri Jul 3 15:16:02 2015 UTC

agg: avoid writting beyond the array size

Potentially trying to add two new items to an array without enough room left.

CID 991455

----------------------------------------------------------------------------

diff --git a/src/libs/agg/src/agg_vcgen_dash.cpp
b/src/libs/agg/src/agg_vcgen_dash.cpp
index 1295057..582b53f 100644
--- a/src/libs/agg/src/agg_vcgen_dash.cpp
+++ b/src/libs/agg/src/agg_vcgen_dash.cpp
@@ -54,7 +54,7 @@ namespace agg
//------------------------------------------------------------------------
void vcgen_dash::add_dash(double dash_len, double gap_len)
{
- if(m_num_dashes < max_dashes)
+ if(m_num_dashes < max_dashes - 1)
{
m_total_dash_len += dash_len + gap_len;
m_dashes[m_num_dashes++] = dash_len;

############################################################################

Revision: hrev49357
Commit: 8108282b325dba0e69234014f919486dc7d49977
URL: http://cgit.haiku-os.org/haiku/commit/?id=8108282b325d
Author: Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date: Fri Jul 3 15:30:19 2015 UTC

jpeg translator: exif_parser: Missing break statement

CID 1273786 and CID 1273787

----------------------------------------------------------------------------

diff --git a/src/add-ons/translators/jpeg/exif_parser.cpp
b/src/add-ons/translators/jpeg/exif_parser.cpp
index 6e73acc..1b0ae15 100644
--- a/src/add-ons/translators/jpeg/exif_parser.cpp
+++ b/src/add-ons/translators/jpeg/exif_parser.cpp
@@ -138,6 +138,7 @@ add_to_message(TReadHelper& source, BMessage& target,
tiff_tag& tag,
defaultType = B_DOUBLE_TYPE;
double value = source.Next<int32>();
doubleValue = value / source.Next<int32>();
+ break;
}

// floating point


Other related posts:

  • » [haiku-commits] haiku: hrev49357 - in src: kits/tracker libs/agg/src - stpere