Round #2 of scan-build warnings cleanup
This commit is contained in:
@@ -391,7 +391,6 @@ _gssapi_wrap_cfx_iov(OM_uint32 *minor_status,
|
||||
if (IS_DCE_STYLE(ctx))
|
||||
rrc -= ec;
|
||||
gsshsize += gsstsize;
|
||||
gsstsize = 0;
|
||||
} else if (GSS_IOV_BUFFER_FLAGS(trailer->type) & GSS_IOV_BUFFER_FLAG_ALLOCATE) {
|
||||
major_status = _gk_allocate_buffer(minor_status, trailer, gsstsize);
|
||||
if (major_status)
|
||||
@@ -683,6 +682,7 @@ unrotate_iov(OM_uint32 *minor_status, size_t rrc, gss_iov_buffer_desc *iov, int
|
||||
if (iov[i].buffer.length <= skip) {
|
||||
skip -= iov[i].buffer.length;
|
||||
} else {
|
||||
/* copy back to original buffer */
|
||||
memcpy(((uint8_t *)iov[i].buffer.value) + skip, q, iov[i].buffer.length - skip);
|
||||
q += iov[i].buffer.length - skip;
|
||||
skip = 0;
|
||||
@@ -697,13 +697,14 @@ unrotate_iov(OM_uint32 *minor_status, size_t rrc, gss_iov_buffer_desc *iov, int
|
||||
GSS_IOV_BUFFER_TYPE(iov[i].type) == GSS_IOV_BUFFER_TYPE_PADDING ||
|
||||
GSS_IOV_BUFFER_TYPE(iov[i].type) == GSS_IOV_BUFFER_TYPE_TRAILER)
|
||||
{
|
||||
memcpy(q, iov[i].buffer.value, min(iov[i].buffer.length, skip));
|
||||
memcpy(iov[i].buffer.value, q, min(iov[i].buffer.length, skip));
|
||||
if (iov[i].buffer.length > skip)
|
||||
break;
|
||||
skip -= iov[i].buffer.length;
|
||||
q += iov[i].buffer.length;
|
||||
}
|
||||
}
|
||||
free(p);
|
||||
return GSS_S_COMPLETE;
|
||||
}
|
||||
|
||||
@@ -930,7 +931,6 @@ _gssapi_unwrap_cfx_iov(OM_uint32 *minor_status,
|
||||
}
|
||||
|
||||
gsshsize += gsstsize;
|
||||
gsstsize = 0;
|
||||
} else if (trailer->buffer.length != gsstsize) {
|
||||
major_status = GSS_S_DEFECTIVE_TOKEN;
|
||||
goto failure;
|
||||
|
Reference in New Issue
Block a user