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:
914f79b
)
Avoid undefined results when the parameter is out of range.
author
Geoff Thorpe
<geoff@openssl.org>
Fri, 2 Apr 2004 06:25:30 +0000
(06:25 +0000)
committer
Geoff Thorpe
<geoff@openssl.org>
Fri, 2 Apr 2004 06:25:30 +0000
(06:25 +0000)
crypto/stack/stack.c
patch
|
blob
|
history
diff --git
a/crypto/stack/stack.c
b/crypto/stack/stack.c
index 02857f044664bf4ee34c21a6514855f9ee1ec718..7877b15a4f0b23fef32b870486804f3eaef240fa 100644
(file)
--- a/
crypto/stack/stack.c
+++ b/
crypto/stack/stack.c
@@
-304,7
+304,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];
}