1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +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:
Nikolas Garofil 2008-06-07 12:34:07 +00:00
parent b24e258165
commit 538dbe4e91

View File

@ -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,