Fix use of NUL compared against pointers, including a real bug due to missing indices. Bump revision.diff -r1.3 -r1.4 pkgsrc/devel/google-glog/Makefile
(joerg)
@@ -1,34 +1,35 @@ | @@ -1,34 +1,35 @@ | |||
1 | # $NetBSD: Makefile,v 1.3 2013/05/09 13:50:14 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.4 2013/07/18 12:01:29 joerg Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= glog-0.3.3 | 4 | DISTNAME= glog-0.3.3 | |
5 | PKGNAME= google-${DISTNAME} | 5 | PKGNAME= google-${DISTNAME} | |
6 | PKGREVISION= 1 | |||
6 | CATEGORIES= devel | 7 | CATEGORIES= devel | |
7 | MASTER_SITES= http://google-glog.googlecode.com/files/ | 8 | MASTER_SITES= http://google-glog.googlecode.com/files/ | |
8 | 9 | |||
9 | MAINTAINER= tonnerre@NetBSD.org | 10 | MAINTAINER= tonnerre@NetBSD.org | |
10 | HOMEPAGE= http://code.google.com/p/google-glog/ | 11 | HOMEPAGE= http://code.google.com/p/google-glog/ | |
11 | COMMENT= Application Level Logging library for C++ | 12 | COMMENT= Application Level Logging library for C++ | |
12 | LICENSE= modified-bsd | 13 | LICENSE= modified-bsd | |
13 | 14 | |||
14 | GNU_CONFIGURE= yes | 15 | GNU_CONFIGURE= yes | |
15 | USE_LIBTOOL= yes | 16 | USE_LIBTOOL= yes | |
16 | USE_TOOLS+= pkg-config | 17 | USE_TOOLS+= pkg-config | |
17 | USE_LANGUAGES= c c++ | 18 | USE_LANGUAGES= c c++ | |
18 | 19 | |||
19 | PKGCONFIG_OVERRIDE+= libglog.pc.in | 20 | PKGCONFIG_OVERRIDE+= libglog.pc.in | |
20 | 21 | |||
21 | .include "../../mk/bsd.prefs.mk" | 22 | .include "../../mk/bsd.prefs.mk" | |
22 | 23 | |||
23 | .if ${OPSYS} == "NetBSD" && exists(/usr/include/execinfo.h) | 24 | .if ${OPSYS} == "NetBSD" && exists(/usr/include/execinfo.h) | |
24 | LIBS+= -lexecinfo | 25 | LIBS+= -lexecinfo | |
25 | .endif | 26 | .endif | |
26 | 27 | |||
27 | .include "../../mk/compiler.mk" | 28 | .include "../../mk/compiler.mk" | |
28 | .if !empty(PKGSRC_COMPILER:Mclang) | 29 | .if !empty(PKGSRC_COMPILER:Mclang) | |
29 | CXXFLAGS+= -std=c++11 | 30 | CXXFLAGS+= -std=c++11 | |
30 | .endif | 31 | .endif | |
31 | 32 | |||
32 | .include "../../devel/googletest/buildlink3.mk" | 33 | .include "../../devel/googletest/buildlink3.mk" | |
33 | .include "../../devel/gmock/buildlink3.mk" | 34 | .include "../../devel/gmock/buildlink3.mk" | |
34 | .include "../../mk/bsd.pkg.mk" | 35 | .include "../../mk/bsd.pkg.mk" |
@@ -1,6 +1,7 @@ | @@ -1,6 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.2 2013/05/09 13:50:14 joerg Exp $ | 1 | $NetBSD: distinfo,v 1.3 2013/07/18 12:01:29 joerg Exp $ | |
2 | 2 | |||
3 | SHA1 (glog-0.3.3.tar.gz) = ed40c26ecffc5ad47c618684415799ebaaa30d65 | 3 | SHA1 (glog-0.3.3.tar.gz) = ed40c26ecffc5ad47c618684415799ebaaa30d65 | |
4 | RMD160 (glog-0.3.3.tar.gz) = 27fb1bd4156f6715b84d59293d96d1cadc79ea7a | 4 | RMD160 (glog-0.3.3.tar.gz) = 27fb1bd4156f6715b84d59293d96d1cadc79ea7a | |
5 | Size (glog-0.3.3.tar.gz) = 509676 bytes | 5 | Size (glog-0.3.3.tar.gz) = 509676 bytes | |
6 | SHA1 (patch-src_demangle.cc) = a5c0ed2b5069894a52735cc691fd12997c77a8cd | |||
6 | SHA1 (patch-src_glog_stl__logging.h.in) = c86472e0f87ca99e91a5ecdb8c33affdb6679c26 | 7 | SHA1 (patch-src_glog_stl__logging.h.in) = c86472e0f87ca99e91a5ecdb8c33affdb6679c26 |
$NetBSD: patch-src_demangle.cc,v 1.1 2013/07/18 12:01:29 joerg Exp $
--- src/demangle.cc.orig 2012-01-12 08:40:58.000000000 +0000
+++ src/demangle.cc
@@ -167,7 +167,7 @@ static size_t StrLen(const char *str) {
// Returns true if "str" has at least "n" characters remaining.
static bool AtLeastNumCharsRemaining(const char *str, int n) {
for (int i = 0; i < n; ++i) {
- if (str == '\0') {
+ if (str[i] == '\0') {
return false;
}
}
@@ -223,7 +223,7 @@ static bool ParseTwoCharToken(State *sta
// Returns true and advances "mangled_cur" if we find any character in
// "char_class" at "mangled_cur" position.
static bool ParseCharClass(State *state, const char *char_class) {
- if (state->mangled_cur == '\0') {
+ if (state->mangled_cur == NULL) {
return false;
}
const char *p = char_class;