|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Fix random segfaults in with xm top
Unfortunately, this patch introduces another potential segfault from an unterminated string. See below for how to fix. Jerone Young wrote:
- name = (char *)malloc((size_t)sizeof(char));
- name[0] = ' ';
+ name = malloc(2);
+ name[0] = ' ';
+ name[1] = 0;
Or better yet:
- name = (char *)malloc((size_t)sizeof(char));
- name[0] = ' ';
+ name = strdup(" ");
Regards,
Anthony Liguori
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |