From c33f2ad355a291cb1a919074ceaa25f52bc85b76 Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Wed, 1 Oct 2014 22:35:22 +0200 Subject: Corrected & refactored handling of window bar content... Old snprintf calls could have overflowed the buffers. --- window.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'window.h') diff --git a/window.h b/window.h index 1178007..8761120 100644 --- a/window.h +++ b/window.h @@ -49,6 +49,12 @@ typedef struct { int depth; } win_env_t; +typedef struct { + size_t size; + char *p; + char *buf; +} win_bar_t; + typedef struct { Window xwin; win_env_t env; @@ -73,8 +79,8 @@ typedef struct { struct { unsigned int h; - char l[BAR_L_LEN]; - char r[BAR_R_LEN]; + win_bar_t l; + win_bar_t r; unsigned long bgcol; unsigned long fgcol; } bar; -- cgit v1.2.3