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. 4597712d5db0186d9ffb


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 4597712d5db0186d9ffb431f108f284fd15ad7bb
Date: Thu, 11 Nov 2010 16:24:17 +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  4597712d5db0186d9ffb431f108f284fd15ad7bb (commit)
       via  b9ff665f835e8fffc9ab2705491e75881e820f35 (commit)
      from  161c0185871eb1e0cf2c37360ea7767457744d7f (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=4597712d5db0186d9ffb431f108f284fd15ad7bb


commit 4597712d5db0186d9ffb431f108f284fd15ad7bb
Author: Sandro Santilli <address@hidden>
Date:   Thu Nov 11 17:23:59 2010 +0100

    Clamp values passed with -j/-k to avoid segfaults..

diff --git a/gui/fb/fb.cpp b/gui/fb/fb.cpp
index b57fa2c..8433a2a 100644
--- a/gui/fb/fb.cpp
+++ b/gui/fb/fb.cpp
@@ -77,6 +77,9 @@
 #include "gnashconfig.h"
 #endif
 
+#include "GnashSystemIOHeaders.h"
+#include "GnashNumeric.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/time.h>
@@ -87,7 +90,6 @@
 #include <linux/fb.h>
 #include <linux/kd.h>
 #include <linux/vt.h>
-#include "GnashSystemIOHeaders.h"
 #include <csignal>
 #include <cstdlib> // getenv
 
@@ -322,10 +324,10 @@ FBGui::init(int argc, char *** argv)
     while ((c = getopt (argc, *argv, "j:k:")) != -1) {
         switch (c) {
             case 'j':
-                _width = atoi(optarg);
+                _width = clamp<int>(atoi(optarg), 1, _width);
                 break;
             case 'k':
-                _height = atoi(optarg);
+                _height = clamp<int>(atoi(optarg), 1, _height);
                 break;
         }
     }

http://git.savannah.gnu.org/cgit//commit/?id=b9ff665f835e8fffc9ab2705491e75881e820f35


commit b9ff665f835e8fffc9ab2705491e75881e820f35
Author: Sandro Santilli <address@hidden>
Date:   Thu Nov 11 17:23:41 2010 +0100

    use of assert() requires <cassert> include

diff --git a/libbase/GnashNumeric.h b/libbase/GnashNumeric.h
index 5aab65a..fb4f029 100644
--- a/libbase/GnashNumeric.h
+++ b/libbase/GnashNumeric.h
@@ -29,6 +29,7 @@
 # include <ieeefp.h> // for finite()
 #endif
 
+#include <cassert>
 #include <cmath>
 #include <algorithm>
 #include <boost/cstdint.hpp>

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

Summary of changes:
 gui/fb/fb.cpp          |    8 +++++---
 libbase/GnashNumeric.h |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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