all repos — tint2 @ c1bdb560b20d23ebf62d741b07c3ff64c2d4d7c9

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

launcher: Prevent calling strlen on NULL

git-svn-id: http://tint2.googlecode.com/svn/trunk@540 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
o9000 o9000
commit

c1bdb560b20d23ebf62d741b07c3ff64c2d4d7c9

parent

d16dcae93e2d83e3add7a72892abd406902fff9a

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/launcher/launcher.csrc/launcher/launcher.c

@@ -372,7 +372,7 @@ // %i -> --icon Icon

// %c -> Name // %k -> path if (entry->exec) { - char *exec2 = malloc(strlen(entry->exec) + strlen(entry->name) + strlen(entry->icon) + 100); + char *exec2 = malloc(strlen(entry->exec) + (entry->name ? strlen(entry->name) : 1) + (entry->icon ? strlen(entry->icon) : 1) + 100); char *p, *q; // p will never point to an escaped char for (p = entry->exec, q = exec2; *p; p++, q++) {