gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-239-g1163866
Date: Fri, 11 Mar 2011 14:58:41 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  1163866db47b0177d0dd894dc5e50ccc5cf9734b (commit)
      from  f46e5dc1b7218b47c79a1fe696a9c4174f17d129 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=1163866db47b0177d0dd894dc5e50ccc5cf9734b


commit 1163866db47b0177d0dd894dc5e50ccc5cf9734b
Author: Bastiaan Jacques <address@hidden>
Date:   Fri Mar 11 15:57:40 2011 +0100

    Use a 64-bit precision type to avoid integer overflows. Fixing bug #32735.

diff --git a/libbase/curl_adapter.cpp b/libbase/curl_adapter.cpp
index 1b2e082..0fe060e 100644
--- a/libbase/curl_adapter.cpp
+++ b/libbase/curl_adapter.cpp
@@ -498,7 +498,7 @@ private:
     std::string _postdata;
 
     // Current size of cached data
-    size_t _cached;
+    std::streampos _cached;
 
     /// Total stream size.
     //
@@ -508,7 +508,7 @@ private:
 
     // Attempt at filling the cache up to the given size.
     // Will call libcurl routines to fetch data.
-    void fillCache(std::streamsize size);
+    void fillCache(std::streampos size);
 
     // Process pending curl messages (handles 404)
     void processMessages();
@@ -603,7 +603,7 @@ CurlStreamFile::fillCacheNonBlocking()
 
 /*private*/
 void
-CurlStreamFile::fillCache(std::streamsize size)
+CurlStreamFile::fillCache(std::streampos size)
 {
 
 #if GNASH_CURL_VERBOSE
@@ -612,7 +612,7 @@ CurlStreamFile::fillCache(std::streamsize size)
 
     assert(size >= 0);
 
-    if ( ! _running || _cached >= static_cast<size_t>(size)) {
+    if ( ! _running || _cached >= size) {
 #if GNASH_CURL_VERBOSE
         if (!_running) log_debug("Not running: returning");
         else log_debug("Already enough bytes cached: returning");
@@ -644,7 +644,7 @@ CurlStreamFile::fillCache(std::streamsize size)
         // Do this here to avoid calling select()
         // when we have enough bytes anyway, or
         // we reached EOF
-        if (_cached >= static_cast<size_t>(size) || !_running) break; 
+        if (_cached >= size || !_running) break; 
        
 #if GNASH_CURL_VERBOSE
         //log_debug("cached: %d, size: %d", _cached, size);
@@ -1164,7 +1164,7 @@ CurlStreamFile::seek(std::streampos pos)
     fillCache(pos);
     if (_error) return false; // error can be set by fillCache
 
-    if (_cached < static_cast<size_t>(pos)) {
+    if (_cached < pos) {
         log_error ("Warning: could not cache enough bytes on seek: %d "
                   "requested, %d cached", pos, _cached);
         return false; 

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

Summary of changes:
 libbase/curl_adapter.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]