fix another occurence of negative array index access and in a better way
bump PKGNAMEs
This commit is contained in:
parent
5a0b5e75a4
commit
0732547b99
@ -1,12 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.26 2008/03/18 20:25:11 sturm Exp $
|
||||
# $OpenBSD: Makefile,v 1.27 2008/03/19 17:15:53 sturm Exp $
|
||||
|
||||
COMMENT-main= host and service monitor
|
||||
COMMENT-web= cgis and webpages for nagios
|
||||
|
||||
V= 3.0
|
||||
DISTNAME= nagios-${V}
|
||||
PKGNAME-main= nagios-${V}
|
||||
PKGNAME-web= nagios-web-${V}
|
||||
PKGNAME-main= nagios-${V}p0
|
||||
PKGNAME-web= nagios-web-${V}p0
|
||||
CATEGORIES= net
|
||||
|
||||
HOMEPAGE= http://www.nagios.org/
|
||||
|
12
net/nagios/nagios/patches/patch-base_utils_c
Normal file
12
net/nagios/nagios/patches/patch-base_utils_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_utils_c,v 1.1 2008/03/19 17:15:53 sturm Exp $
|
||||
--- base/utils.c.orig Mon Mar 10 21:58:33 2008
|
||||
+++ base/utils.c Wed Mar 19 18:04:29 2008
|
||||
@@ -3482,7 +3482,7 @@ char *mmap_fgets_multiline(mmapfile *temp_mmapfile){
|
||||
}
|
||||
|
||||
/* one backslash found, so we should continue reading the next line */
|
||||
- else if(buf[end]=='\\')
|
||||
+ else if(end>=0 && buf[end]=='\\')
|
||||
buf[end]='\x0';
|
||||
|
||||
/* else no continuation marker was found, so break */
|
@ -1,14 +1,12 @@
|
||||
$OpenBSD: patch-cgi_cgiutils_c,v 1.1 2008/03/18 20:25:11 sturm Exp $
|
||||
--- cgi/cgiutils.c.orig Sun Mar 16 15:17:27 2008
|
||||
+++ cgi/cgiutils.c Sun Mar 16 15:17:31 2008
|
||||
@@ -1346,6 +1346,10 @@ char *mmap_fgets_multiline(mmapfile *temp_mmapfile){
|
||||
else
|
||||
end=len-1;
|
||||
$OpenBSD: patch-cgi_cgiutils_c,v 1.2 2008/03/19 17:15:53 sturm Exp $
|
||||
--- cgi/cgiutils.c.orig Tue Feb 26 16:58:32 2008
|
||||
+++ cgi/cgiutils.c Wed Mar 19 18:05:15 2008
|
||||
@@ -1354,7 +1354,7 @@ char *mmap_fgets_multiline(mmapfile *temp_mmapfile){
|
||||
}
|
||||
|
||||
+ /* array indices may not be negative */
|
||||
+ if(end<0)
|
||||
+ end=0;
|
||||
+
|
||||
/* two backslashes found, so unescape first backslash first and break */
|
||||
if(end>=1 && buf[end-1]=='\\' && buf[end]=='\\'){
|
||||
buf[end]='\n';
|
||||
/* one backslash found, so we should continue reading the next line */
|
||||
- else if(buf[end]=='\\')
|
||||
+ else if(end>=0 && buf[end]=='\\')
|
||||
buf[end]='\x0';
|
||||
|
||||
/* else no continuation marker was found, so break */
|
||||
|
Loading…
x
Reference in New Issue
Block a user