mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
Prevent negative array index in function get_kev(). Valid arguments
for i are [1,1000]. This function is unused, but fix it anyway.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
COMMENT = perl interface to the BSD kqueue system call
|
||||
|
||||
DISTNAME = IO-KQueue-0.39
|
||||
REVISION = 0
|
||||
|
||||
CATEGORIES = devel
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Prevent negative array index. Array has 1000 elements, i-1 is the index.
|
||||
|
||||
Index: KQueue.xs
|
||||
--- KQueue.xs.orig
|
||||
+++ KQueue.xs
|
||||
@@ -143,7 +143,7 @@ get_kev(kq, i)
|
||||
PREINIT:
|
||||
dXSTARG;
|
||||
CODE:
|
||||
- if (i < 0 || i >= 1000) {
|
||||
+ if (i <= 0 || i > 1000) {
|
||||
croak("Invalid kevent id: %d", i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user