projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f36f469
)
Avoid undefined results when the parameter is out of range.
author
Geoff Thorpe
<geoff@openssl.org>
Fri, 2 Apr 2004 06:25:53 +0000
(06:25 +0000)
committer
Geoff Thorpe
<geoff@openssl.org>
Fri, 2 Apr 2004 06:25:53 +0000
(06:25 +0000)
crypto/stack/stack.c
patch
|
blob
|
history
diff --git
a/crypto/stack/stack.c
b/crypto/stack/stack.c
index 2496f28a8c01b0faaf36d8355495ce249aa2855c..ff6d14a86ce5e2a997d02145b0d6ac4046c08235 100644
(file)
--- a/
crypto/stack/stack.c
+++ b/
crypto/stack/stack.c
@@
-306,7
+306,7
@@
int sk_num(const STACK *st)
char *sk_value(const STACK *st, int i)
{
- if(
st == NULL
) return NULL;
+ if(
!st || (i < 0) || (i >= st->num)
) return NULL;
return st->data[i];
}