mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 02:55:12 +00:00
Bugfix: DEV_NAME tried to read uninitialised mem
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1139 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
b24e258165
commit
538dbe4e91
@ -2329,7 +2329,8 @@ void scan_mixer_bar(const char *arg, int *a, int *w, int *h)
|
||||
}
|
||||
|
||||
/* strip a leading /dev/ if any */
|
||||
#define DEV_NAME(x) strncmp(x, "/dev/", 5) ? x : x + 5
|
||||
#define DEV_NAME(x) x != NULL && strlen(x) > 5 && strncmp(x, "/dev/", 5) == 0 \
|
||||
? x + 5 : x
|
||||
|
||||
/* construct_text_object() creates a new text_object */
|
||||
static struct text_object *construct_text_object(const char *s,
|
||||
|
Loading…
Reference in New Issue
Block a user