projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cb2a54
)
[libmultipath] add vector_del_slot() checks
author
Christophe Varoqui
<root@xa-s05.(none)>
Sat, 29 Oct 2005 14:26:51 +0000
(16:26 +0200)
committer
Christophe Varoqui
<root@xa-s05.(none)>
Sat, 29 Oct 2005 14:26:51 +0000
(16:26 +0200)
Verify that the slot number we where asked to delete is not "< 0" nor
"> VECTOR_SIZE()".
libmultipath/vector.c
patch
|
blob
|
history
diff --git
a/libmultipath/vector.c
b/libmultipath/vector.c
index
a529557
..
d7459ee
100644
(file)
--- a/
libmultipath/vector.c
+++ b/
libmultipath/vector.c
@@
-80,7
+80,7
@@
vector_del_slot(vector v, int slot)
{
int i;
- if (!v->allocated)
+ if (!v->allocated
|| slot < 0 || slot > VECTOR_SIZE(v)
)
return;
for (i = slot + 1; i < (v->allocated / VECTOR_DEFAULT_SIZE); i++)