cgroup_create_template_group procedure writes to the first place of string of characters even if the varible points to NULL. As the result templates crashes.
See http://sourceforge.net/mailarchive/forum.php?thread_name=khtfkj%24c8l%241%40ger.gmane.org&forum_name=libcg-devel
Signed-off-by: Ivana Hutarova Varekova <varekova@redhat.com>
Acked-By: Jan Safranek <jsafrane@redhat.com>
}
while_end:
- if (template_position[0] == '\0')
+ if ((template_position != NULL ) && (template_position[0] == '\0'))
template_position[0] = '/';
- if (group_position[0] == '\0')
+ if ((group_position != NULL) && (group_position[0] == '\0'))
group_position[0] = '/';
end: