[SCM] QtCurve packaging branch, master, updated. debian/1.8.18+git20160320-3d8622c-4-2-g32bed08

Boris Pek tehnick at moszumanska.debian.org
Thu Aug 3 12:51:28 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/qtcurve.git;a=commitdiff;h=e326c65

The following commit has been merged in the master branch:
commit e326c65b4dfb26881c162fa272916c88c3d53f1b
Author: Boris Pek <tehnick-8 at yandex.ru>
Date:   Thu Aug 3 15:45:23 2017 +0300

    Add patch replace-memcmp-with-strncmp.
    
    It fixes crash when using QtCurve widget style and Breeze preset.
    (Closes: #865765)
---
 debian/patches/replace-memcmp-with-strncmp.patch | 1337 ++++++++++++++++++++++
 debian/patches/series                            |    1 +
 2 files changed, 1338 insertions(+)

diff --git a/debian/patches/replace-memcmp-with-strncmp.patch b/debian/patches/replace-memcmp-with-strncmp.patch
new file mode 100644
index 0000000..8bcf06e
--- /dev/null
+++ b/debian/patches/replace-memcmp-with-strncmp.patch
@@ -0,0 +1,1337 @@
+Description: Replace memcmp with strncmp
+ Do not exceed string buffer length while parsing config file.
+Origin: upstream, https://cgit.kde.org/qtcurve.git/commit/?id=f164a4b69
+Bug: https://bugs.kde.org/show_bug.cgi?id=374046
+Bug-Debian: https://bugs.debian.org/865765
+Last-Update: 2017-08-03
+
+--- a/gtk2/common/config_file.cpp
++++ b/gtk2/common/config_file.cpp
+@@ -88,17 +88,17 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "dashes", 6))
++        if(0==strncmp(str, "dashes", 6))
+             return LINE_DASHES;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return LINE_NONE;
+-        if(0==memcmp(str, "sunken", 6))
++        if(0==strncmp(str, "sunken", 6))
+             return LINE_SUNKEN;
+-        if(0==memcmp(str, "dots", 4))
++        if(0==strncmp(str, "dots", 4))
+             return LINE_DOTS;
+-        if(0==memcmp(str, "flat", 4))
++        if(0==strncmp(str, "flat", 4))
+             return LINE_FLAT;
+-        if(0==memcmp(str, "1dot", 5))
++        if(0==strncmp(str, "1dot", 5))
+             return LINE_1DOT;
+     }
+     return def;
+@@ -108,12 +108,12 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "dark", 4))
+-            return 0==memcmp(&str[4], "-all", 4) ? TB_DARK_ALL : TB_DARK;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "dark", 4))
++            return 0==strncmp(&str[4], "-all", 4) ? TB_DARK_ALL : TB_DARK;
++        if(0==strncmp(str, "none", 4))
+             return TB_NONE;
+-        if(0==memcmp(str, "light", 5))
+-            return 0==memcmp(&str[5], "-all", 4) ? TB_LIGHT_ALL : TB_LIGHT;
++        if(0==strncmp(str, "light", 5))
++            return 0==strncmp(&str[5], "-all", 4) ? TB_LIGHT_ALL : TB_LIGHT;
+     }
+     return def;
+ }
+@@ -122,15 +122,15 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "true", 4) || 0==memcmp(str, "colored", 7))
++        if(0==strncmp(str, "true", 4) || 0==strncmp(str, "colored", 7))
+             return MO_COLORED;
+-        if(0==memcmp(str, "thickcolored", 12))
++        if(0==strncmp(str, "thickcolored", 12))
+             return MO_COLORED_THICK;
+-        if(0==memcmp(str, "plastik", 7))
++        if(0==strncmp(str, "plastik", 7))
+             return MO_PLASTIK;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return MO_GLOW;
+-        if(0==memcmp(str, "false", 4) || 0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "false", 4) || 0==strncmp(str, "none", 4))
+             return MO_NONE;
+     }
+     return def;
+@@ -140,40 +140,40 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "flat", 4))
++        if(0==strncmp(str, "flat", 4))
+             return APPEARANCE_FLAT;
+-        if(0==memcmp(str, "raised", 6))
++        if(0==strncmp(str, "raised", 6))
+             return APPEARANCE_RAISED;
+-        if(0==memcmp(str, "dullglass", 9))
++        if(0==strncmp(str, "dullglass", 9))
+             return APPEARANCE_DULL_GLASS;
+-        if(0==memcmp(str, "glass", 5) || 0==memcmp(str, "shinyglass", 10))
++        if(0==strncmp(str, "glass", 5) || 0==strncmp(str, "shinyglass", 10))
+             return APPEARANCE_SHINY_GLASS;
+-        if(0==memcmp(str, "agua", 4))
++        if(0==strncmp(str, "agua", 4))
+             return APPEARANCE_AGUA;
+-        if(0==memcmp(str, "soft", 4))
++        if(0==strncmp(str, "soft", 4))
+             return APPEARANCE_SOFT_GRADIENT;
+-        if(0==memcmp(str, "gradient", 8) || 0==memcmp(str, "lightgradient", 13))
++        if(0==strncmp(str, "gradient", 8) || 0==strncmp(str, "lightgradient", 13))
+             return APPEARANCE_GRADIENT;
+-        if(0==memcmp(str, "harsh", 5))
++        if(0==strncmp(str, "harsh", 5))
+             return APPEARANCE_HARSH_GRADIENT;
+-        if(0==memcmp(str, "inverted", 8))
++        if(0==strncmp(str, "inverted", 8))
+             return APPEARANCE_INVERTED;
+-        if(0==memcmp(str, "darkinverted", 12))
++        if(0==strncmp(str, "darkinverted", 12))
+             return APPEARANCE_DARK_INVERTED;
+-        if(0==memcmp(str, "splitgradient", 13))
++        if(0==strncmp(str, "splitgradient", 13))
+             return APPEARANCE_SPLIT_GRADIENT;
+-        if(0==memcmp(str, "bevelled", 8))
++        if(0==strncmp(str, "bevelled", 8))
+             return APPEARANCE_BEVELLED;
+-        if(APP_ALLOW_FADE==allow && 0==memcmp(str, "fade", 4))
++        if(APP_ALLOW_FADE==allow && 0==strncmp(str, "fade", 4))
+             return APPEARANCE_FADE;
+-        if(APP_ALLOW_STRIPED==allow && 0==memcmp(str, "striped", 7))
++        if(APP_ALLOW_STRIPED==allow && 0==strncmp(str, "striped", 7))
+             return APPEARANCE_STRIPED;
+-        if(APP_ALLOW_NONE==allow && 0==memcmp(str, "none", 4))
++        if(APP_ALLOW_NONE==allow && 0==strncmp(str, "none", 4))
+             return APPEARANCE_NONE;
+-        if(nullptr!=pix && APP_ALLOW_STRIPED==allow && 0==memcmp(str, "file", 4) && strlen(str)>9)
++        if(nullptr!=pix && APP_ALLOW_STRIPED==allow && 0==strncmp(str, "file", 4) && strlen(str)>9)
+             return loadImage(&str[5], pix) || !checkImage ? APPEARANCE_FILE : def;
+ 
+-        if(0==memcmp(str, "customgradient", 14) && strlen(str)>14)
++        if(0==strncmp(str, "customgradient", 14) && strlen(str)>14)
+         {
+             int i=atoi(&str[14]);
+ 
+@@ -192,22 +192,22 @@
+     if(str && 0!=str[0])
+     {
+         /* true/false is from 0.25... */
+-        if((!menuShade && 0==memcmp(str, "true", 4)) || 0==memcmp(str, "selected", 8))
++        if((!menuShade && 0==strncmp(str, "true", 4)) || 0==strncmp(str, "selected", 8))
+             return SHADE_BLEND_SELECTED;
+-        if(0==memcmp(str, "origselected", 12))
++        if(0==strncmp(str, "origselected", 12))
+             return SHADE_SELECTED;
+-        if(allowMenu && (0==memcmp(str, "darken", 6) || (menuShade && 0==memcmp(str, "true", 4))))
++        if(allowMenu && (0==strncmp(str, "darken", 6) || (menuShade && 0==strncmp(str, "true", 4))))
+             return SHADE_DARKEN;
+-        if(allowMenu && 0==memcmp(str, "wborder", 7))
++        if(allowMenu && 0==strncmp(str, "wborder", 7))
+             return SHADE_WINDOW_BORDER;
+-        if(0==memcmp(str, "custom", 6))
++        if(0==strncmp(str, "custom", 6))
+             return SHADE_CUSTOM;
+         if('#'==str[0] && col)
+         {
+             qtcSetRgb(col, str);
+             return SHADE_CUSTOM;
+         }
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return SHADE_NONE;
+     }
+ 
+@@ -219,15 +219,15 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "none", 4) || 0==strncmp(str, "false", 5))
+             return ROUND_NONE;
+-        if(0==memcmp(str, "slight", 6))
++        if(0==strncmp(str, "slight", 6))
+             return ROUND_SLIGHT;
+-        if(0==memcmp(str, "full", 4))
++        if(0==strncmp(str, "full", 4))
+             return ROUND_FULL;
+-        if(0==memcmp(str, "extra", 5))
++        if(0==strncmp(str, "extra", 5))
+             return ROUND_EXTRA;
+-        if(0==memcmp(str, "max", 3))
++        if(0==strncmp(str, "max", 3))
+             return ROUND_MAX;
+     }
+ 
+@@ -250,11 +250,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return EFFECT_NONE;
+-        if(0==memcmp(str, "shadow", 6))
++        if(0==strncmp(str, "shadow", 6))
+             return EFFECT_SHADOW;
+-        if(0==memcmp(str, "etch", 4))
++        if(0==strncmp(str, "etch", 4))
+             return EFFECT_ETCH;
+     }
+ 
+@@ -271,13 +271,13 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "plain", 5) || 0==memcmp(str, "true", 4))
++        if(0==strncmp(str, "plain", 5) || 0==strncmp(str, "true", 4))
+             return STRIPE_PLAIN;
+-        if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "none", 4) || 0==strncmp(str, "false", 5))
+             return STRIPE_NONE;
+-        if(0==memcmp(str, "diagonal", 8))
++        if(0==strncmp(str, "diagonal", 8))
+             return STRIPE_DIAGONAL;
+-        if(0==memcmp(str, "fade", 4))
++        if(0==strncmp(str, "fade", 4))
+             return STRIPE_FADE;
+     }
+ 
+@@ -288,17 +288,17 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "round", 5))
++        if(0==strncmp(str, "round", 5))
+             return SLIDER_ROUND;
+-        if(0==memcmp(str, "plain", 5))
++        if(0==strncmp(str, "plain", 5))
+             return SLIDER_PLAIN;
+-        if(0==memcmp(str, "r-round", 7))
++        if(0==strncmp(str, "r-round", 7))
+             return SLIDER_ROUND_ROTATED;
+-        if(0==memcmp(str, "r-plain", 7))
++        if(0==strncmp(str, "r-plain", 7))
+             return SLIDER_PLAIN_ROTATED;
+-        if(0==memcmp(str, "triangular", 10))
++        if(0==strncmp(str, "triangular", 10))
+             return SLIDER_TRIANGULAR;
+-        if(0==memcmp(str, "circular", 8))
++        if(0==strncmp(str, "circular", 8))
+             return SLIDER_CIRCULAR;
+     }
+ 
+@@ -309,11 +309,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "base", 4))
++        if(0==strncmp(str, "base", 4))
+             return ECOLOR_BASE;
+-        if(0==memcmp(str, "dark", 4))
++        if(0==strncmp(str, "dark", 4))
+             return ECOLOR_DARK;
+-        if(0==memcmp(str, "background", 10))
++        if(0==strncmp(str, "background", 10))
+             return ECOLOR_BACKGROUND;
+     }
+ 
+@@ -324,19 +324,19 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "standard", 8))
++        if(0==strncmp(str, "standard", 8))
+             return FOCUS_STANDARD;
+-        if(0==memcmp(str, "rect", 4) || 0==memcmp(str, "highlight", 9))
++        if(0==strncmp(str, "rect", 4) || 0==strncmp(str, "highlight", 9))
+             return FOCUS_RECTANGLE;
+-        if(0==memcmp(str, "filled", 6))
++        if(0==strncmp(str, "filled", 6))
+             return FOCUS_FILLED;
+-        if(0==memcmp(str, "full", 4))
++        if(0==strncmp(str, "full", 4))
+             return FOCUS_FULL;
+-        if(0==memcmp(str, "line", 4))
++        if(0==strncmp(str, "line", 4))
+             return FOCUS_LINE;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return FOCUS_GLOW;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return FOCUS_NONE;
+     }
+ 
+@@ -347,11 +347,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "top", 3))
++        if(0==strncmp(str, "top", 3))
+             return TAB_MO_TOP;
+-        if(0==memcmp(str, "bot", 3))
++        if(0==strncmp(str, "bot", 3))
+             return TAB_MO_BOTTOM;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return TAB_MO_GLOW;
+     }
+ 
+@@ -362,9 +362,9 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "horiz", 5))
++        if(0==strncmp(str, "horiz", 5))
+             return GT_HORIZ;
+-        if(0==memcmp(str, "vert", 4))
++        if(0==strncmp(str, "vert", 4))
+             return GT_VERT;
+     }
+     return def;
+@@ -375,14 +375,14 @@
+     if(str && 0!=str[0])
+     {
+ #if 0
+-        if(0==memcmp(str, "true", 4) || 0==memcmp(str, "new", 3))
++        if(0==strncmp(str, "true", 4) || 0==strncmp(str, "new", 3))
+             return LV_NEW;
+-        if(0==memcmp(str, "old", 3))
++        if(0==strncmp(str, "old", 3))
+             return LV_OLD;
+-        if(0==memcmp(str, "false", 5) || 0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "false", 5) || 0==strncmp(str, "none", 4))
+             return LV_NONE;
+ #else
+-        return 0!=memcmp(str, "false", 5);
++        return 0!=strncmp(str, "false", 5);
+ #endif
+     }
+     return def;
+@@ -392,15 +392,15 @@
+ {
+     if (str && str[0]) {
+         *haveAlpha = strstr(str, "-alpha") ? true : false;
+-        if(0==memcmp(str, "light", 5) || 0==memcmp(str, "true", 4))
++        if(0==strncmp(str, "light", 5) || 0==strncmp(str, "true", 4))
+             return GB_LIGHT;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return GB_NONE;
+-        if(0==memcmp(str, "3dfull", 6))
++        if(0==strncmp(str, "3dfull", 6))
+             return GB_3D_FULL;
+-        if(0==memcmp(str, "3d", 2) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "3d", 2) || 0==strncmp(str, "false", 5))
+             return GB_3D;
+-        if(0==memcmp(str, "shine", 5))
++        if(0==strncmp(str, "shine", 5))
+             return GB_SHINE;
+     }
+     return GB_3D;
+@@ -411,11 +411,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return TITLEBAR_ICON_NONE;
+-        if(0==memcmp(str, "menu", 4))
++        if(0==strncmp(str, "menu", 4))
+             return TITLEBAR_ICON_MENU_BUTTON;
+-        if(0==memcmp(str, "title", 5))
++        if(0==strncmp(str, "title", 5))
+             return TITLEBAR_ICON_NEXT_TO_TITLE;
+     }
+     return def;
+@@ -426,15 +426,15 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return IMG_NONE;
+-        if(0==memcmp(str, "plainrings", 10))
++        if(0==strncmp(str, "plainrings", 10))
+             return IMG_PLAIN_RINGS;
+-        if(0==memcmp(str, "rings", 5))
++        if(0==strncmp(str, "rings", 5))
+             return IMG_BORDERED_RINGS;
+-        if(0==memcmp(str, "squarerings", 11))
++        if(0==strncmp(str, "squarerings", 11))
+             return IMG_SQUARE_RINGS;
+-        if(0==memcmp(str, "file", 4))
++        if(0==strncmp(str, "file", 4))
+             return IMG_FILE;
+     }
+     return def;
+@@ -444,13 +444,13 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return GLOW_NONE;
+-        if(0==memcmp(str, "start", 5))
++        if(0==strncmp(str, "start", 5))
+             return GLOW_START;
+-        if(0==memcmp(str, "middle", 6))
++        if(0==strncmp(str, "middle", 6))
+             return GLOW_MIDDLE;
+-        if(0==memcmp(str, "end", 3))
++        if(0==strncmp(str, "end", 3))
+             return GLOW_END;
+     }
+     return def;
+@@ -460,11 +460,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "standard", 8))
++        if(0==strncmp(str, "standard", 8))
+             return TBTN_STANDARD;
+-        if(0==memcmp(str, "raised", 6))
++        if(0==strncmp(str, "raised", 6))
+             return TBTN_RAISED;
+-        if(0==memcmp(str, "joined", 6))
++        if(0==strncmp(str, "joined", 6))
+             return TBTN_JOINED;
+     }
+     return def;
+@@ -634,7 +634,7 @@
+ readBoolEntry(GHashTable *cfg, const char *key, bool def)
+ {
+     char *str = readStringEntry(cfg, key);
+-    return str ? (memcmp(str, "true", 4) == 0 ? true : false) : def;
++    return str ? (strncmp(str, "true", 4) == 0 ? true : false) : def;
+ }
+ 
+ static void
+--- a/qt4/common/config_file.cpp
++++ b/qt4/common/config_file.cpp
+@@ -80,21 +80,21 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "fontcolor", 9) || 0==memcmp(str, "border", 6))
++        if(0==strncmp(str, "fontcolor", 9) || 0==strncmp(str, "border", 6))
+             return IND_FONT_COLOR;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return IND_NONE;
+-        if(0==memcmp(str, "corner", 6))
++        if(0==strncmp(str, "corner", 6))
+             return IND_CORNER;
+-        if(0==memcmp(str, "colored", 7))
++        if(0==strncmp(str, "colored", 7))
+             return IND_COLORED;
+-        if(0==memcmp(str, "tint", 4))
++        if(0==strncmp(str, "tint", 4))
+             return IND_TINT;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return IND_GLOW;
+-        if(0==memcmp(str, "darken", 6))
++        if(0==strncmp(str, "darken", 6))
+             return IND_DARKEN;
+-        if(0==memcmp(str, "origselected", 12))
++        if(0==strncmp(str, "origselected", 12))
+             return IND_SELECTED;
+     }
+ 
+@@ -105,17 +105,17 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "dashes", 6))
++        if(0==strncmp(str, "dashes", 6))
+             return LINE_DASHES;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return LINE_NONE;
+-        if(0==memcmp(str, "sunken", 6))
++        if(0==strncmp(str, "sunken", 6))
+             return LINE_SUNKEN;
+-        if(0==memcmp(str, "dots", 4))
++        if(0==strncmp(str, "dots", 4))
+             return LINE_DOTS;
+-        if(0==memcmp(str, "flat", 4))
++        if(0==strncmp(str, "flat", 4))
+             return LINE_FLAT;
+-        if(0==memcmp(str, "1dot", 5))
++        if(0==strncmp(str, "1dot", 5))
+             return LINE_1DOT;
+     }
+     return def;
+@@ -125,12 +125,12 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "dark", 4))
+-            return 0==memcmp(&str[4], "-all", 4) ? TB_DARK_ALL : TB_DARK;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "dark", 4))
++            return 0==strncmp(&str[4], "-all", 4) ? TB_DARK_ALL : TB_DARK;
++        if(0==strncmp(str, "none", 4))
+             return TB_NONE;
+-        if(0==memcmp(str, "light", 5))
+-            return 0==memcmp(&str[5], "-all", 4) ? TB_LIGHT_ALL : TB_LIGHT;
++        if(0==strncmp(str, "light", 5))
++            return 0==strncmp(&str[5], "-all", 4) ? TB_LIGHT_ALL : TB_LIGHT;
+     }
+     return def;
+ }
+@@ -139,15 +139,15 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "true", 4) || 0==memcmp(str, "colored", 7))
++        if(0==strncmp(str, "true", 4) || 0==strncmp(str, "colored", 7))
+             return MO_COLORED;
+-        if(0==memcmp(str, "thickcolored", 12))
++        if(0==strncmp(str, "thickcolored", 12))
+             return MO_COLORED_THICK;
+-        if(0==memcmp(str, "plastik", 7))
++        if(0==strncmp(str, "plastik", 7))
+             return MO_PLASTIK;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return MO_GLOW;
+-        if(0==memcmp(str, "false", 4) || 0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "false", 4) || 0==strncmp(str, "none", 4))
+             return MO_NONE;
+     }
+     return def;
+@@ -157,41 +157,41 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "flat", 4))
++        if(0==strncmp(str, "flat", 4))
+             return APPEARANCE_FLAT;
+-        if(0==memcmp(str, "raised", 6))
++        if(0==strncmp(str, "raised", 6))
+             return APPEARANCE_RAISED;
+-        if(0==memcmp(str, "dullglass", 9))
++        if(0==strncmp(str, "dullglass", 9))
+             return APPEARANCE_DULL_GLASS;
+-        if(0==memcmp(str, "glass", 5) || 0==memcmp(str, "shinyglass", 10))
++        if(0==strncmp(str, "glass", 5) || 0==strncmp(str, "shinyglass", 10))
+             return APPEARANCE_SHINY_GLASS;
+-        if(0==memcmp(str, "agua", 4))
++        if(0==strncmp(str, "agua", 4))
+             return APPEARANCE_AGUA;
+-        if(0==memcmp(str, "soft", 4))
++        if(0==strncmp(str, "soft", 4))
+             return APPEARANCE_SOFT_GRADIENT;
+-        if(0==memcmp(str, "gradient", 8) || 0==memcmp(str, "lightgradient", 13))
++        if(0==strncmp(str, "gradient", 8) || 0==strncmp(str, "lightgradient", 13))
+             return APPEARANCE_GRADIENT;
+-        if(0==memcmp(str, "harsh", 5))
++        if(0==strncmp(str, "harsh", 5))
+             return APPEARANCE_HARSH_GRADIENT;
+-        if(0==memcmp(str, "inverted", 8))
++        if(0==strncmp(str, "inverted", 8))
+             return APPEARANCE_INVERTED;
+-        if(0==memcmp(str, "darkinverted", 12))
++        if(0==strncmp(str, "darkinverted", 12))
+             return APPEARANCE_DARK_INVERTED;
+-        if(0==memcmp(str, "splitgradient", 13))
++        if(0==strncmp(str, "splitgradient", 13))
+             return APPEARANCE_SPLIT_GRADIENT;
+-        if(0==memcmp(str, "bevelled", 8))
++        if(0==strncmp(str, "bevelled", 8))
+             return APPEARANCE_BEVELLED;
+-        if(APP_ALLOW_FADE==allow && 0==memcmp(str, "fade", 4))
++        if(APP_ALLOW_FADE==allow && 0==strncmp(str, "fade", 4))
+             return APPEARANCE_FADE;
+-        if(APP_ALLOW_STRIPED==allow && 0==memcmp(str, "striped", 7))
++        if(APP_ALLOW_STRIPED==allow && 0==strncmp(str, "striped", 7))
+             return APPEARANCE_STRIPED;
+-        if(APP_ALLOW_NONE==allow && 0==memcmp(str, "none", 4))
++        if(APP_ALLOW_NONE==allow && 0==strncmp(str, "none", 4))
+             return APPEARANCE_NONE;
+         if (pix && APP_ALLOW_STRIPED == allow &&
+-            0==memcmp(str, "file", 4) && strlen(str)>9)
++            0==strncmp(str, "file", 4) && strlen(str)>9)
+             return loadImage(&str[5], pix) || !checkImage ? APPEARANCE_FILE : def;
+ 
+-        if(0==memcmp(str, "customgradient", 14) && strlen(str)>14)
++        if(0==strncmp(str, "customgradient", 14) && strlen(str)>14)
+         {
+             int i=atoi(&str[14]);
+ 
+@@ -210,22 +210,22 @@
+     if(str && 0!=str[0])
+     {
+         /* true/false is from 0.25... */
+-        if((!menuShade && 0==memcmp(str, "true", 4)) || 0==memcmp(str, "selected", 8))
++        if((!menuShade && 0==strncmp(str, "true", 4)) || 0==strncmp(str, "selected", 8))
+             return SHADE_BLEND_SELECTED;
+-        if(0==memcmp(str, "origselected", 12))
++        if(0==strncmp(str, "origselected", 12))
+             return SHADE_SELECTED;
+-        if(allowMenu && (0==memcmp(str, "darken", 6) || (menuShade && 0==memcmp(str, "true", 4))))
++        if(allowMenu && (0==strncmp(str, "darken", 6) || (menuShade && 0==strncmp(str, "true", 4))))
+             return SHADE_DARKEN;
+-        if(allowMenu && 0==memcmp(str, "wborder", 7))
++        if(allowMenu && 0==strncmp(str, "wborder", 7))
+             return SHADE_WINDOW_BORDER;
+-        if(0==memcmp(str, "custom", 6))
++        if(0==strncmp(str, "custom", 6))
+             return SHADE_CUSTOM;
+         if('#'==str[0] && col)
+         {
+             qtcSetRgb(col, str);
+             return SHADE_CUSTOM;
+         }
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return SHADE_NONE;
+     }
+ 
+@@ -237,15 +237,15 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "none", 4) || 0==strncmp(str, "false", 5))
+             return ROUND_NONE;
+-        if(0==memcmp(str, "slight", 6))
++        if(0==strncmp(str, "slight", 6))
+             return ROUND_SLIGHT;
+-        if(0==memcmp(str, "full", 4))
++        if(0==strncmp(str, "full", 4))
+             return ROUND_FULL;
+-        if(0==memcmp(str, "extra", 5))
++        if(0==strncmp(str, "extra", 5))
+             return ROUND_EXTRA;
+-        if(0==memcmp(str, "max", 3))
++        if(0==strncmp(str, "max", 3))
+             return ROUND_MAX;
+     }
+ 
+@@ -267,11 +267,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return EFFECT_NONE;
+-        if(0==memcmp(str, "shadow", 6))
++        if(0==strncmp(str, "shadow", 6))
+             return EFFECT_SHADOW;
+-        if(0==memcmp(str, "etch", 4))
++        if(0==strncmp(str, "etch", 4))
+             return EFFECT_ETCH;
+     }
+ 
+@@ -288,13 +288,13 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "plain", 5) || 0==memcmp(str, "true", 4))
++        if(0==strncmp(str, "plain", 5) || 0==strncmp(str, "true", 4))
+             return STRIPE_PLAIN;
+-        if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "none", 4) || 0==strncmp(str, "false", 5))
+             return STRIPE_NONE;
+-        if(0==memcmp(str, "diagonal", 8))
++        if(0==strncmp(str, "diagonal", 8))
+             return STRIPE_DIAGONAL;
+-        if(0==memcmp(str, "fade", 4))
++        if(0==strncmp(str, "fade", 4))
+             return STRIPE_FADE;
+     }
+ 
+@@ -305,17 +305,17 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "round", 5))
++        if(0==strncmp(str, "round", 5))
+             return SLIDER_ROUND;
+-        if(0==memcmp(str, "plain", 5))
++        if(0==strncmp(str, "plain", 5))
+             return SLIDER_PLAIN;
+-        if(0==memcmp(str, "r-round", 7))
++        if(0==strncmp(str, "r-round", 7))
+             return SLIDER_ROUND_ROTATED;
+-        if(0==memcmp(str, "r-plain", 7))
++        if(0==strncmp(str, "r-plain", 7))
+             return SLIDER_PLAIN_ROTATED;
+-        if(0==memcmp(str, "triangular", 10))
++        if(0==strncmp(str, "triangular", 10))
+             return SLIDER_TRIANGULAR;
+-        if(0==memcmp(str, "circular", 8))
++        if(0==strncmp(str, "circular", 8))
+             return SLIDER_CIRCULAR;
+     }
+ 
+@@ -326,11 +326,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "base", 4))
++        if(0==strncmp(str, "base", 4))
+             return ECOLOR_BASE;
+-        if(0==memcmp(str, "dark", 4))
++        if(0==strncmp(str, "dark", 4))
+             return ECOLOR_DARK;
+-        if(0==memcmp(str, "background", 10))
++        if(0==strncmp(str, "background", 10))
+             return ECOLOR_BACKGROUND;
+     }
+ 
+@@ -341,19 +341,19 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "standard", 8))
++        if(0==strncmp(str, "standard", 8))
+             return FOCUS_STANDARD;
+-        if(0==memcmp(str, "rect", 4) || 0==memcmp(str, "highlight", 9))
++        if(0==strncmp(str, "rect", 4) || 0==strncmp(str, "highlight", 9))
+             return FOCUS_RECTANGLE;
+-        if(0==memcmp(str, "filled", 6))
++        if(0==strncmp(str, "filled", 6))
+             return FOCUS_FILLED;
+-        if(0==memcmp(str, "full", 4))
++        if(0==strncmp(str, "full", 4))
+             return FOCUS_FULL;
+-        if(0==memcmp(str, "line", 4))
++        if(0==strncmp(str, "line", 4))
+             return FOCUS_LINE;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return FOCUS_GLOW;
+-	if(0==memcmp(str, "none", 4))
++	if(0==strncmp(str, "none", 4))
+             return FOCUS_NONE;
+     }
+ 
+@@ -364,11 +364,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "top", 3))
++        if(0==strncmp(str, "top", 3))
+             return TAB_MO_TOP;
+-        if(0==memcmp(str, "bot", 3))
++        if(0==strncmp(str, "bot", 3))
+             return TAB_MO_BOTTOM;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return TAB_MO_GLOW;
+     }
+ 
+@@ -379,9 +379,9 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "horiz", 5))
++        if(0==strncmp(str, "horiz", 5))
+             return GT_HORIZ;
+-        if(0==memcmp(str, "vert", 4))
++        if(0==strncmp(str, "vert", 4))
+             return GT_VERT;
+     }
+     return def;
+@@ -392,14 +392,14 @@
+     if(str && 0!=str[0])
+     {
+ #if 0
+-        if(0==memcmp(str, "true", 4) || 0==memcmp(str, "new", 3))
++        if(0==strncmp(str, "true", 4) || 0==strncmp(str, "new", 3))
+             return LV_NEW;
+-        if(0==memcmp(str, "old", 3))
++        if(0==strncmp(str, "old", 3))
+             return LV_OLD;
+-        if(0==memcmp(str, "false", 5) || 0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "false", 5) || 0==strncmp(str, "none", 4))
+             return LV_NONE;
+ #else
+-        return 0!=memcmp(str, "false", 5);
++        return 0!=strncmp(str, "false", 5);
+ #endif
+     }
+     return def;
+@@ -409,15 +409,15 @@
+ {
+     if (str && str[0]) {
+         *haveAlpha = strstr(str, "-alpha") ? true : false;
+-        if(0==memcmp(str, "light", 5) || 0==memcmp(str, "true", 4))
++        if(0==strncmp(str, "light", 5) || 0==strncmp(str, "true", 4))
+             return GB_LIGHT;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return GB_NONE;
+-        if(0==memcmp(str, "3dfull", 6))
++        if(0==strncmp(str, "3dfull", 6))
+             return GB_3D_FULL;
+-        if(0==memcmp(str, "3d", 2) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "3d", 2) || 0==strncmp(str, "false", 5))
+             return GB_3D;
+-        if(0==memcmp(str, "shine", 5))
++        if(0==strncmp(str, "shine", 5))
+             return GB_SHINE;
+     }
+     return GB_3D;
+@@ -427,13 +427,13 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "left", 4))
++        if(0==strncmp(str, "left", 4))
+             return ALIGN_LEFT;
+-        if(0==memcmp(str, "center-full", 11))
++        if(0==strncmp(str, "center-full", 11))
+             return ALIGN_FULL_CENTER;
+-        if(0==memcmp(str, "center", 6))
++        if(0==strncmp(str, "center", 6))
+             return ALIGN_CENTER;
+-        if(0==memcmp(str, "right", 5))
++        if(0==strncmp(str, "right", 5))
+             return ALIGN_RIGHT;
+     }
+     return def;
+@@ -443,11 +443,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return TITLEBAR_ICON_NONE;
+-        if(0==memcmp(str, "menu", 4))
++        if(0==strncmp(str, "menu", 4))
+             return TITLEBAR_ICON_MENU_BUTTON;
+-        if(0==memcmp(str, "title", 5))
++        if(0==strncmp(str, "title", 5))
+             return TITLEBAR_ICON_NEXT_TO_TITLE;
+     }
+     return def;
+@@ -457,15 +457,15 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return IMG_NONE;
+-        if(0==memcmp(str, "plainrings", 10))
++        if(0==strncmp(str, "plainrings", 10))
+             return IMG_PLAIN_RINGS;
+-        if(0==memcmp(str, "rings", 5))
++        if(0==strncmp(str, "rings", 5))
+             return IMG_BORDERED_RINGS;
+-        if(0==memcmp(str, "squarerings", 11))
++        if(0==strncmp(str, "squarerings", 11))
+             return IMG_SQUARE_RINGS;
+-        if(0==memcmp(str, "file", 4))
++        if(0==strncmp(str, "file", 4))
+             return IMG_FILE;
+     }
+     return def;
+@@ -475,13 +475,13 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return GLOW_NONE;
+-        if(0==memcmp(str, "start", 5))
++        if(0==strncmp(str, "start", 5))
+             return GLOW_START;
+-        if(0==memcmp(str, "middle", 6))
++        if(0==strncmp(str, "middle", 6))
+             return GLOW_MIDDLE;
+-        if(0==memcmp(str, "end", 3))
++        if(0==strncmp(str, "end", 3))
+             return GLOW_END;
+     }
+     return def;
+@@ -491,11 +491,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "standard", 8))
++        if(0==strncmp(str, "standard", 8))
+             return TBTN_STANDARD;
+-        if(0==memcmp(str, "raised", 6))
++        if(0==strncmp(str, "raised", 6))
+             return TBTN_RAISED;
+-        if(0==memcmp(str, "joined", 6))
++        if(0==strncmp(str, "joined", 6))
+             return TBTN_JOINED;
+     }
+     return def;
+--- a/qt5/common/config_file.cpp
++++ b/qt5/common/config_file.cpp
+@@ -79,21 +79,21 @@
+ toInd(const char *str, EDefBtnIndicator def)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "fontcolor", 9) || 0==memcmp(str, "border", 6))
++        if(0==strncmp(str, "fontcolor", 9) || 0==strncmp(str, "border", 6))
+             return IND_FONT_COLOR;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return IND_NONE;
+-        if(0==memcmp(str, "corner", 6))
++        if(0==strncmp(str, "corner", 6))
+             return IND_CORNER;
+-        if(0==memcmp(str, "colored", 7))
++        if(0==strncmp(str, "colored", 7))
+             return IND_COLORED;
+-        if(0==memcmp(str, "tint", 4))
++        if(0==strncmp(str, "tint", 4))
+             return IND_TINT;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return IND_GLOW;
+-        if(0==memcmp(str, "darken", 6))
++        if(0==strncmp(str, "darken", 6))
+             return IND_DARKEN;
+-        if(0==memcmp(str, "origselected", 12))
++        if(0==strncmp(str, "origselected", 12))
+             return IND_SELECTED;
+     }
+     return def;
+@@ -103,17 +103,17 @@
+ toLine(const char *str, ELine def)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "dashes", 6))
++        if(0==strncmp(str, "dashes", 6))
+             return LINE_DASHES;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return LINE_NONE;
+-        if(0==memcmp(str, "sunken", 6))
++        if(0==strncmp(str, "sunken", 6))
+             return LINE_SUNKEN;
+-        if(0==memcmp(str, "dots", 4))
++        if(0==strncmp(str, "dots", 4))
+             return LINE_DOTS;
+-        if(0==memcmp(str, "flat", 4))
++        if(0==strncmp(str, "flat", 4))
+             return LINE_FLAT;
+-        if(0==memcmp(str, "1dot", 5))
++        if(0==strncmp(str, "1dot", 5))
+             return LINE_1DOT;
+     }
+     return def;
+@@ -123,12 +123,12 @@
+ toTBarBorder(const char *str, ETBarBorder def)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "dark", 4))
+-            return 0==memcmp(&str[4], "-all", 4) ? TB_DARK_ALL : TB_DARK;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "dark", 4))
++            return 0==strncmp(&str[4], "-all", 4) ? TB_DARK_ALL : TB_DARK;
++        if(0==strncmp(str, "none", 4))
+             return TB_NONE;
+-        if(0==memcmp(str, "light", 5))
+-            return 0==memcmp(&str[5], "-all", 4) ? TB_LIGHT_ALL : TB_LIGHT;
++        if(0==strncmp(str, "light", 5))
++            return 0==strncmp(&str[5], "-all", 4) ? TB_LIGHT_ALL : TB_LIGHT;
+     }
+     return def;
+ }
+@@ -137,15 +137,15 @@
+ toMouseOver(const char *str, EMouseOver def)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "true", 4) || 0==memcmp(str, "colored", 7))
++        if(0==strncmp(str, "true", 4) || 0==strncmp(str, "colored", 7))
+             return MO_COLORED;
+-        if(0==memcmp(str, "thickcolored", 12))
++        if(0==strncmp(str, "thickcolored", 12))
+             return MO_COLORED_THICK;
+-        if(0==memcmp(str, "plastik", 7))
++        if(0==strncmp(str, "plastik", 7))
+             return MO_PLASTIK;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return MO_GLOW;
+-        if(0==memcmp(str, "false", 4) || 0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "false", 4) || 0==strncmp(str, "none", 4))
+             return MO_NONE;
+     }
+     return def;
+@@ -156,40 +156,40 @@
+              QtCPixmap *pix, bool checkImage)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "flat", 4))
++        if(0==strncmp(str, "flat", 4))
+             return APPEARANCE_FLAT;
+-        if(0==memcmp(str, "raised", 6))
++        if(0==strncmp(str, "raised", 6))
+             return APPEARANCE_RAISED;
+-        if(0==memcmp(str, "dullglass", 9))
++        if(0==strncmp(str, "dullglass", 9))
+             return APPEARANCE_DULL_GLASS;
+-        if(0==memcmp(str, "glass", 5) || 0==memcmp(str, "shinyglass", 10))
++        if(0==strncmp(str, "glass", 5) || 0==strncmp(str, "shinyglass", 10))
+             return APPEARANCE_SHINY_GLASS;
+-        if(0==memcmp(str, "agua", 4))
++        if(0==strncmp(str, "agua", 4))
+             return APPEARANCE_AGUA;
+-        if(0==memcmp(str, "soft", 4))
++        if(0==strncmp(str, "soft", 4))
+             return APPEARANCE_SOFT_GRADIENT;
+-        if(0==memcmp(str, "gradient", 8) || 0==memcmp(str, "lightgradient", 13))
++        if(0==strncmp(str, "gradient", 8) || 0==strncmp(str, "lightgradient", 13))
+             return APPEARANCE_GRADIENT;
+-        if(0==memcmp(str, "harsh", 5))
++        if(0==strncmp(str, "harsh", 5))
+             return APPEARANCE_HARSH_GRADIENT;
+-        if(0==memcmp(str, "inverted", 8))
++        if(0==strncmp(str, "inverted", 8))
+             return APPEARANCE_INVERTED;
+-        if(0==memcmp(str, "darkinverted", 12))
++        if(0==strncmp(str, "darkinverted", 12))
+             return APPEARANCE_DARK_INVERTED;
+-        if(0==memcmp(str, "splitgradient", 13))
++        if(0==strncmp(str, "splitgradient", 13))
+             return APPEARANCE_SPLIT_GRADIENT;
+-        if(0==memcmp(str, "bevelled", 8))
++        if(0==strncmp(str, "bevelled", 8))
+             return APPEARANCE_BEVELLED;
+-        if(APP_ALLOW_FADE==allow && 0==memcmp(str, "fade", 4))
++        if(APP_ALLOW_FADE==allow && 0==strncmp(str, "fade", 4))
+             return APPEARANCE_FADE;
+-        if(APP_ALLOW_STRIPED==allow && 0==memcmp(str, "striped", 7))
++        if(APP_ALLOW_STRIPED==allow && 0==strncmp(str, "striped", 7))
+             return APPEARANCE_STRIPED;
+-        if(APP_ALLOW_NONE==allow && 0==memcmp(str, "none", 4))
++        if(APP_ALLOW_NONE==allow && 0==strncmp(str, "none", 4))
+             return APPEARANCE_NONE;
+-        if (pix && APP_ALLOW_STRIPED==allow && 0==memcmp(str, "file", 4) && strlen(str)>9)
++        if (pix && APP_ALLOW_STRIPED==allow && 0==strncmp(str, "file", 4) && strlen(str)>9)
+             return loadImage(&str[5], pix) || !checkImage ? APPEARANCE_FILE : def;
+ 
+-        if(0==memcmp(str, "customgradient", 14) && strlen(str)>14)
++        if(0==strncmp(str, "customgradient", 14) && strlen(str)>14)
+         {
+             int i=atoi(&str[14]);
+ 
+@@ -207,22 +207,22 @@
+ {
+     if (str && str[0]) {
+         /* true/false is from 0.25... */
+-        if((!menuShade && 0==memcmp(str, "true", 4)) || 0==memcmp(str, "selected", 8))
++        if((!menuShade && 0==strncmp(str, "true", 4)) || 0==strncmp(str, "selected", 8))
+             return SHADE_BLEND_SELECTED;
+-        if(0==memcmp(str, "origselected", 12))
++        if(0==strncmp(str, "origselected", 12))
+             return SHADE_SELECTED;
+-        if(allowMenu && (0==memcmp(str, "darken", 6) || (menuShade && 0==memcmp(str, "true", 4))))
++        if(allowMenu && (0==strncmp(str, "darken", 6) || (menuShade && 0==strncmp(str, "true", 4))))
+             return SHADE_DARKEN;
+-        if(allowMenu && 0==memcmp(str, "wborder", 7))
++        if(allowMenu && 0==strncmp(str, "wborder", 7))
+             return SHADE_WINDOW_BORDER;
+-        if(0==memcmp(str, "custom", 6))
++        if(0==strncmp(str, "custom", 6))
+             return SHADE_CUSTOM;
+         if('#'==str[0] && col)
+         {
+             qtcSetRgb(col, str);
+             return SHADE_CUSTOM;
+         }
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return SHADE_NONE;
+     }
+ 
+@@ -234,15 +234,15 @@
+ toRound(const char *str, ERound def)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "none", 4) || 0==strncmp(str, "false", 5))
+             return ROUND_NONE;
+-        if(0==memcmp(str, "slight", 6))
++        if(0==strncmp(str, "slight", 6))
+             return ROUND_SLIGHT;
+-        if(0==memcmp(str, "full", 4))
++        if(0==strncmp(str, "full", 4))
+             return ROUND_FULL;
+-        if(0==memcmp(str, "extra", 5))
++        if(0==strncmp(str, "extra", 5))
+             return ROUND_EXTRA;
+-        if(0==memcmp(str, "max", 3))
++        if(0==strncmp(str, "max", 3))
+             return ROUND_MAX;
+     }
+     return def;
+@@ -264,11 +264,11 @@
+ toEffect(const char *str, EEffect def)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return EFFECT_NONE;
+-        if(0==memcmp(str, "shadow", 6))
++        if(0==strncmp(str, "shadow", 6))
+             return EFFECT_SHADOW;
+-        if(0==memcmp(str, "etch", 4))
++        if(0==strncmp(str, "etch", 4))
+             return EFFECT_ETCH;
+     }
+ 
+@@ -285,13 +285,13 @@
+ toStripe(const char *str, EStripe def)
+ {
+     if (str && str[0]) {
+-        if(0==memcmp(str, "plain", 5) || 0==memcmp(str, "true", 4))
++        if(0==strncmp(str, "plain", 5) || 0==strncmp(str, "true", 4))
+             return STRIPE_PLAIN;
+-        if(0==memcmp(str, "none", 4) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "none", 4) || 0==strncmp(str, "false", 5))
+             return STRIPE_NONE;
+-        if(0==memcmp(str, "diagonal", 8))
++        if(0==strncmp(str, "diagonal", 8))
+             return STRIPE_DIAGONAL;
+-        if(0==memcmp(str, "fade", 4))
++        if(0==strncmp(str, "fade", 4))
+             return STRIPE_FADE;
+     }
+ 
+@@ -302,17 +302,17 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "round", 5))
++        if(0==strncmp(str, "round", 5))
+             return SLIDER_ROUND;
+-        if(0==memcmp(str, "plain", 5))
++        if(0==strncmp(str, "plain", 5))
+             return SLIDER_PLAIN;
+-        if(0==memcmp(str, "r-round", 7))
++        if(0==strncmp(str, "r-round", 7))
+             return SLIDER_ROUND_ROTATED;
+-        if(0==memcmp(str, "r-plain", 7))
++        if(0==strncmp(str, "r-plain", 7))
+             return SLIDER_PLAIN_ROTATED;
+-        if(0==memcmp(str, "triangular", 10))
++        if(0==strncmp(str, "triangular", 10))
+             return SLIDER_TRIANGULAR;
+-        if(0==memcmp(str, "circular", 8))
++        if(0==strncmp(str, "circular", 8))
+             return SLIDER_CIRCULAR;
+     }
+ 
+@@ -323,11 +323,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "base", 4))
++        if(0==strncmp(str, "base", 4))
+             return ECOLOR_BASE;
+-        if(0==memcmp(str, "dark", 4))
++        if(0==strncmp(str, "dark", 4))
+             return ECOLOR_DARK;
+-        if(0==memcmp(str, "background", 10))
++        if(0==strncmp(str, "background", 10))
+             return ECOLOR_BACKGROUND;
+     }
+ 
+@@ -338,19 +338,19 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "standard", 8))
++        if(0==strncmp(str, "standard", 8))
+             return FOCUS_STANDARD;
+-        if(0==memcmp(str, "rect", 4) || 0==memcmp(str, "highlight", 9))
++        if(0==strncmp(str, "rect", 4) || 0==strncmp(str, "highlight", 9))
+             return FOCUS_RECTANGLE;
+-        if(0==memcmp(str, "filled", 6))
++        if(0==strncmp(str, "filled", 6))
+             return FOCUS_FILLED;
+-        if(0==memcmp(str, "full", 4))
++        if(0==strncmp(str, "full", 4))
+             return FOCUS_FULL;
+-        if(0==memcmp(str, "line", 4))
++        if(0==strncmp(str, "line", 4))
+             return FOCUS_LINE;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return FOCUS_GLOW;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return FOCUS_NONE;
+     }
+ 
+@@ -361,11 +361,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "top", 3))
++        if(0==strncmp(str, "top", 3))
+             return TAB_MO_TOP;
+-        if(0==memcmp(str, "bot", 3))
++        if(0==strncmp(str, "bot", 3))
+             return TAB_MO_BOTTOM;
+-        if(0==memcmp(str, "glow", 4))
++        if(0==strncmp(str, "glow", 4))
+             return TAB_MO_GLOW;
+     }
+ 
+@@ -376,9 +376,9 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "horiz", 5))
++        if(0==strncmp(str, "horiz", 5))
+             return GT_HORIZ;
+-        if(0==memcmp(str, "vert", 4))
++        if(0==strncmp(str, "vert", 4))
+             return GT_VERT;
+     }
+     return def;
+@@ -389,14 +389,14 @@
+     if(str && 0!=str[0])
+     {
+ #if 0
+-        if(0==memcmp(str, "true", 4) || 0==memcmp(str, "new", 3))
++        if(0==strncmp(str, "true", 4) || 0==strncmp(str, "new", 3))
+             return LV_NEW;
+-        if(0==memcmp(str, "old", 3))
++        if(0==strncmp(str, "old", 3))
+             return LV_OLD;
+-        if(0==memcmp(str, "false", 5) || 0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "false", 5) || 0==strncmp(str, "none", 4))
+             return LV_NONE;
+ #else
+-        return 0!=memcmp(str, "false", 5);
++        return 0!=strncmp(str, "false", 5);
+ #endif
+     }
+     return def;
+@@ -406,15 +406,15 @@
+ {
+     if (str && str[0]) {
+         *haveAlpha = strstr(str, "-alpha") ? true : false;
+-        if(0==memcmp(str, "light", 5) || 0==memcmp(str, "true", 4))
++        if(0==strncmp(str, "light", 5) || 0==strncmp(str, "true", 4))
+             return GB_LIGHT;
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return GB_NONE;
+-        if(0==memcmp(str, "3dfull", 6))
++        if(0==strncmp(str, "3dfull", 6))
+             return GB_3D_FULL;
+-        if(0==memcmp(str, "3d", 2) || 0==memcmp(str, "false", 5))
++        if(0==strncmp(str, "3d", 2) || 0==strncmp(str, "false", 5))
+             return GB_3D;
+-        if(0==memcmp(str, "shine", 5))
++        if(0==strncmp(str, "shine", 5))
+             return GB_SHINE;
+     }
+     return GB_3D;
+@@ -424,13 +424,13 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "left", 4))
++        if(0==strncmp(str, "left", 4))
+             return ALIGN_LEFT;
+-        if(0==memcmp(str, "center-full", 11))
++        if(0==strncmp(str, "center-full", 11))
+             return ALIGN_FULL_CENTER;
+-        if(0==memcmp(str, "center", 6))
++        if(0==strncmp(str, "center", 6))
+             return ALIGN_CENTER;
+-        if(0==memcmp(str, "right", 5))
++        if(0==strncmp(str, "right", 5))
+             return ALIGN_RIGHT;
+     }
+     return def;
+@@ -440,11 +440,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return TITLEBAR_ICON_NONE;
+-        if(0==memcmp(str, "menu", 4))
++        if(0==strncmp(str, "menu", 4))
+             return TITLEBAR_ICON_MENU_BUTTON;
+-        if(0==memcmp(str, "title", 5))
++        if(0==strncmp(str, "title", 5))
+             return TITLEBAR_ICON_NEXT_TO_TITLE;
+     }
+     return def;
+@@ -454,15 +454,15 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return IMG_NONE;
+-        if(0==memcmp(str, "plainrings", 10))
++        if(0==strncmp(str, "plainrings", 10))
+             return IMG_PLAIN_RINGS;
+-        if(0==memcmp(str, "rings", 5))
++        if(0==strncmp(str, "rings", 5))
+             return IMG_BORDERED_RINGS;
+-        if(0==memcmp(str, "squarerings", 11))
++        if(0==strncmp(str, "squarerings", 11))
+             return IMG_SQUARE_RINGS;
+-        if(0==memcmp(str, "file", 4))
++        if(0==strncmp(str, "file", 4))
+             return IMG_FILE;
+     }
+     return def;
+@@ -472,13 +472,13 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "none", 4))
++        if(0==strncmp(str, "none", 4))
+             return GLOW_NONE;
+-        if(0==memcmp(str, "start", 5))
++        if(0==strncmp(str, "start", 5))
+             return GLOW_START;
+-        if(0==memcmp(str, "middle", 6))
++        if(0==strncmp(str, "middle", 6))
+             return GLOW_MIDDLE;
+-        if(0==memcmp(str, "end", 3))
++        if(0==strncmp(str, "end", 3))
+             return GLOW_END;
+     }
+     return def;
+@@ -488,11 +488,11 @@
+ {
+     if(str && 0!=str[0])
+     {
+-        if(0==memcmp(str, "standard", 8))
++        if(0==strncmp(str, "standard", 8))
+             return TBTN_STANDARD;
+-        if(0==memcmp(str, "raised", 6))
++        if(0==strncmp(str, "raised", 6))
+             return TBTN_RAISED;
+-        if(0==memcmp(str, "joined", 6))
++        if(0==strncmp(str, "joined", 6))
+             return TBTN_JOINED;
+     }
+     return def;
diff --git a/debian/patches/series b/debian/patches/series
index 10ca6b4..37da121 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ enable-translations.patch
 fix-segfault-in-qt4-style-on-mouse-move-to-window-title.patch
 workaround-for-kwin-x11-crashes.patch
 fix-build-with-qt-5.9.patch
+replace-memcmp-with-strncmp.patch

-- 
QtCurve packaging



More information about the pkg-kde-commits mailing list