diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-10-01 22:35:22 +0200 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-10-01 22:35:22 +0200 |
commit | c33f2ad355a291cb1a919074ceaa25f52bc85b76 (patch) | |
tree | a9b57f51e63e6095e6d16cb5fd219d684a3e1c98 /window.h | |
parent | 8db3191f04d52929ec10b1412d282a4ac4cf5240 (diff) | |
download | nsxiv-c33f2ad355a291cb1a919074ceaa25f52bc85b76.tar.zst |
Corrected & refactored handling of window bar content...
Old snprintf calls could have overflowed the buffers.
Diffstat (limited to 'window.h')
-rw-r--r-- | window.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -50,6 +50,12 @@ typedef struct { } 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; |