[cairo-commit] 2 commits - build/configure.ac.features util/cairo-script

Bryce Harrington bryce at kemper.freedesktop.org
Thu Jun 4 14:32:49 PDT 2015


 build/configure.ac.features              |    2 +-
 util/cairo-script/cairo-script-scanner.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b9ada819953303e708a376779ff27f75ff6bc51c
Author: Bryce Harrington <bryce at osg.samsung.com>
Date:   Thu Jun 4 14:24:31 2015 -0700

    cairo-script: Improve buffer length check
    
    Quells the following warning:
    
    cairo-script-scanner.c: In function ‘_translate_string’:
    cairo-script-scanner.c:1623:18: warning: comparison between signed and
    unsigned integer expressions [-Wsign-compare]
          if (buf_len <= 8 + 2*string->len) {
                      ^

diff --git a/util/cairo-script/cairo-script-scanner.c b/util/cairo-script/cairo-script-scanner.c
index 4254aa0..84b45df 100644
--- a/util/cairo-script/cairo-script-scanner.c
+++ b/util/cairo-script/cairo-script-scanner.c
@@ -1620,7 +1620,8 @@ _translate_string (csi_t *ctx,
 	if (uncompress ((Bytef *) buf, &buf_len,
 			(Bytef *) string->string, string->len) == Z_OK)
 	{
-	    if (buf_len <= 8 + 2*string->len) {
+	    assert(string->len > 0);
+	    if (buf_len <= 8 + 2*((unsigned long)string->len)) {
 		method = NONE;
 		deflate = 0;
 	    } else {
commit f032133e6d5ad05157fc46609d8c63103028342c
Author: Julien Isorce <j.isorce at samsung.com>
Date:   Wed Sep 3 10:58:18 2014 +0100

    build: Show all disabled features in cairo-features.h
    
    Even features which are disabled by default should appear in
    cairo-features.h.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83359
    (Patch approved by Behdad Esfahbod in bug tracker.)
    
    Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

diff --git a/build/configure.ac.features b/build/configure.ac.features
index e4a2aaf..77f2035 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -241,7 +241,7 @@ CAIRO_FEATURE_HOOK_REGISTER(*,!no,!,dnl
 ])dnl
 dnl Collect list of all supported disabled public features
 CAIRO_ACCUMULATORS_REGISTER(NO_FEATURES,[ ])dnl
-CAIRO_FEATURE_HOOK_REGISTER(no,!no,!,
+CAIRO_FEATURE_HOOK_REGISTER(no,*,!,
 [dnl
 	CAIRO_ACCUMULATE(NO_FEATURES, cr_feature_tag)
 ])dnl


More information about the cairo-commit mailing list