mirror of https://gitee.com/openkylin/libvirt.git
* src/xend_internal.c: fix an uninitialized memory access in error
reporting. Daniel
This commit is contained in:
parent
e081236077
commit
b68bd23d9b
|
@ -1,3 +1,8 @@
|
|||
Thu Apr 20 14:31:13 EDT 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xend_internal.c: fix an uninitialized memory access in error
|
||||
reporting.
|
||||
|
||||
Thu Apr 13 17:19:25 EDT 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvirt.h include/libvirt.h.in doc/*: added new entry point
|
||||
|
|
|
@ -395,9 +395,9 @@ xend_req(int fd, char *content, size_t n_content)
|
|||
if (0 > (int) ret)
|
||||
return -1;
|
||||
|
||||
content[nbuf + ret + 1] = '\0';
|
||||
content[nbuf + ret] = 0;
|
||||
} else {
|
||||
content[nbuf + 1] = '\0';
|
||||
content[nbuf] = 0;
|
||||
}
|
||||
} else { /* Unable to complete reading header */
|
||||
content[0] = 0;
|
||||
|
@ -489,6 +489,9 @@ xend_post(virConnectPtr xend, const char *path, const char *ops,
|
|||
|
||||
if ((ret < 0) || (ret >= 300)) {
|
||||
virXendError(NULL, VIR_ERR_POST_FAILED, content);
|
||||
} else if ((ret = 202) && (strstr(content, "failed") != NULL)) {
|
||||
virXendError(NULL, VIR_ERR_POST_FAILED, content);
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue