提交 7132ac83 编写于 作者: M Matt Caswell

Fix memset call in stack.c

The function sk_zero is supposed to zero the elements held within a stack.
It uses memset to do this. However it calculates the size of each element
as being sizeof(char **) instead of sizeof(char *). This probably doesn't
make much practical difference in most cases, but isn't a portable
assumption.
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 be1477ad
......@@ -299,7 +299,7 @@ void sk_zero(_STACK *st)
return;
if (st->num <= 0)
return;
memset((char *)st->data, 0, sizeof(st->data) * st->num);
memset((char *)st->data, 0, sizeof(*st->data) * st->num);
st->num = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册