… | |
… | |
56 | int flags, changed = 0; |
56 | int flags, changed = 0; |
57 | int x = 0, y = 0; |
57 | int x = 0, y = 0; |
58 | unsigned int w = 0, h = 0; |
58 | unsigned int w = 0, h = 0; |
59 | unsigned int n; |
59 | unsigned int n; |
60 | char *p; |
60 | char *p; |
61 | bgPixmap_t *bgpixmap = & (bgPixmap); |
61 | bgPixmap_t *bgpixmap = &bgPixmap; |
62 | |
62 | |
63 | #define MAXLEN_GEOM sizeof("[10000x10000+10000+10000]") |
63 | #define MAXLEN_GEOM sizeof("[10000x10000+10000+10000]") |
64 | |
64 | |
65 | if (geom == NULL) |
65 | if (geom == NULL) |
66 | return 0; |
66 | return 0; |
… | |
… | |
78 | |
78 | |
79 | if ((p = strchr (geom, ';')) == NULL) |
79 | if ((p = strchr (geom, ';')) == NULL) |
80 | p = strchr (geom, '\0'); |
80 | p = strchr (geom, '\0'); |
81 | |
81 | |
82 | n = (p - geom); |
82 | n = (p - geom); |
83 | if (n <= MAXLEN_GEOM) |
83 | if (n < MAXLEN_GEOM) |
84 | { |
84 | { |
85 | strncpy (str, geom, n); |
85 | strncpy (str, geom, n); |
86 | str[n] = '\0'; |
86 | str[n] = '\0'; |
87 | |
87 | |
88 | flags = XParseGeometry (str, &x, &y, &w, &h); |
88 | flags = XParseGeometry (str, &x, &y, &w, &h); |