summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/roken
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/roken')
-rw-r--r--crypto/heimdal/lib/roken/ChangeLog52
-rw-r--r--crypto/heimdal/lib/roken/Makefile.am4
-rw-r--r--crypto/heimdal/lib/roken/Makefile.in21
-rw-r--r--crypto/heimdal/lib/roken/getarg.338
-rw-r--r--crypto/heimdal/lib/roken/getcap.c7
-rw-r--r--crypto/heimdal/lib/roken/parse_bytes.c6
-rw-r--r--crypto/heimdal/lib/roken/parse_time.c4
-rw-r--r--crypto/heimdal/lib/roken/parse_units.h4
-rw-r--r--crypto/heimdal/lib/roken/resolve.c24
-rw-r--r--crypto/heimdal/lib/roken/roken.awk4
-rw-r--r--crypto/heimdal/lib/roken/snprintf.c6
-rw-r--r--crypto/heimdal/lib/roken/socket.c5
-rw-r--r--crypto/heimdal/lib/roken/strcasecmp.c6
-rw-r--r--crypto/heimdal/lib/roken/strlwr.c4
-rw-r--r--crypto/heimdal/lib/roken/strncasecmp.c8
-rw-r--r--crypto/heimdal/lib/roken/strupr.c4
16 files changed, 144 insertions, 53 deletions
diff --git a/crypto/heimdal/lib/roken/ChangeLog b/crypto/heimdal/lib/roken/ChangeLog
index 93cce29..971bc90 100644
--- a/crypto/heimdal/lib/roken/ChangeLog
+++ b/crypto/heimdal/lib/roken/ChangeLog
@@ -1,6 +1,54 @@
-2002-10-21 Johan Danielsson <joda@pdc.kth.se>
+2003-04-22 Love <lha@stacken.kth.se>
- * resolve.c: pull up 1.37; check length of txt records
+ * resolve.c: 1.38->1.39: copy NUL too, from janj@wenf.org via
+ openbsd
+
+2003-04-16 Love <lha@stacken.kth.se>
+
+ * parse_units.h: remove typedef for units to avoid problems with
+ shadowing
+
+ * resolve.c: use strlcpy, from openbsd
+
+ * getcap.c: use strlcpy, from openbsd
+
+ * getarg.3: Change .Fd #include <header.h> to .In header.h
+ from Thomas Klausner <wiz@netbsd.org>
+
+2003-04-15 Love <lha@stacken.kth.se>
+
+ * socket.c (socket_set_tos): if setsockopt failed with EINVAL
+ failed, just ignore it, sock was probably a just a non AF_INET
+ socket
+
+2003-04-14 Love <lha@stacken.kth.se>
+
+ * strncasecmp.c: cast argument to toupper to unsigned char, from
+ Christian Biere <christianbiere@gmx.de> via NetBSD
+
+ * strlwr.c: cast argument to tolower to unsigned char, from
+ Christian Biere <christianbiere@gmx.de> via NetBSD
+
+ * strcasecmp.c: cast argument to toupper to unsigned char, from
+ Christian Biere <christianbiere@gmx.de> via NetBSD
+
+2003-03-19 Love <lha@stacken.kth.se>
+
+ * getarg.3: spelling, from <jmc@prioris.mini.pw.edu.pl>
+
+2003-03-07 Love <lha@stacken.kth.se>
+
+ * parse_bytes.c: use struct units instead of units
+
+ * parse_time.c: use struct units instead of units
+
+2003-03-04 Love <lha@stacken.kth.se>
+
+ * roken.awk: use full prototype for main
+
+2002-10-15 Johan Danielsson <joda@pdc.kth.se>
+
+ * resolve.c: check length of txt records
2002-09-10 Johan Danielsson <joda@pdc.kth.se>
diff --git a/crypto/heimdal/lib/roken/Makefile.am b/crypto/heimdal/lib/roken/Makefile.am
index 7b3aa0a6..a850ee8 100644
--- a/crypto/heimdal/lib/roken/Makefile.am
+++ b/crypto/heimdal/lib/roken/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.122.4.1 2002/10/21 15:03:04 joda Exp $
+# $Id: Makefile.am,v 1.122.6.1 2003/05/12 15:20:47 joda Exp $
include $(top_srcdir)/Makefile.am.common
@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../../cf
CLEANFILES = roken.h make-roken.c $(XHEADERS)
lib_LTLIBRARIES = libroken.la
-libroken_la_LDFLAGS = -version-info 16:1:0
+libroken_la_LDFLAGS = -version-info 16:2:0
noinst_PROGRAMS = make-roken snprintf-test
diff --git a/crypto/heimdal/lib/roken/Makefile.in b/crypto/heimdal/lib/roken/Makefile.in
index fe8bb61..192fb3b 100644
--- a/crypto/heimdal/lib/roken/Makefile.in
+++ b/crypto/heimdal/lib/roken/Makefile.in
@@ -14,11 +14,11 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.122.4.1 2002/10/21 15:03:04 joda Exp $
+# $Id: Makefile.am,v 1.122.6.1 2003/05/12 15:20:47 joda Exp $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
-# $Id: Makefile.am.common,v 1.36 2002/08/19 16:10:25 joda Exp $
+# $Id: Makefile.am.common,v 1.37.2.1 2003/05/08 17:08:09 joda Exp $
SHELL = @SHELL@
srcdir = @srcdir@
@@ -114,6 +114,7 @@ LIB_roken = @LIB_roken@
LIB_security = @LIB_security@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
NROFF = @NROFF@
@@ -192,7 +193,7 @@ LIB_readline = @LIB_readline@
NROFF_MAN = groff -mandoc -Tascii
-@KRB4_TRUE@LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
+LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@@ -206,7 +207,7 @@ ACLOCAL_AMFLAGS = -I ../../cf
CLEANFILES = roken.h make-roken.c $(XHEADERS)
lib_LTLIBRARIES = libroken.la
-libroken_la_LDFLAGS = -version-info 16:1:0
+libroken_la_LDFLAGS = -version-info 16:2:0
noinst_PROGRAMS = make-roken snprintf-test
@@ -497,10 +498,10 @@ all: $(BUILT_SOURCES)
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .hin .c .lo .o .obj
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign lib/roken/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
libLTLIBRARIES_INSTALL = $(INSTALL)
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@@ -892,8 +893,10 @@ info: info-am
info-am:
-install-data-am: install-data-local install-includeHEADERS install-man \
+install-data-am: install-includeHEADERS install-man \
install-nodist_includeHEADERS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-exec-am: install-libLTLIBRARIES
@$(NORMAL_INSTALL)
@@ -926,7 +929,7 @@ uninstall-man: uninstall-man3
clean-noinstPROGRAMS distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am info info-am install install-am install-data \
- install-data-am install-data-local install-exec install-exec-am \
+ install-data-am install-exec install-exec-am \
install-includeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-man3 \
install-nodist_includeHEADERS install-strip installcheck \
@@ -1061,7 +1064,7 @@ dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat8-mans
install-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
-install-data-local: install-cat-mans
+install-data-hook: install-cat-mans
.et.h:
$(COMPILE_ET) $<
diff --git a/crypto/heimdal/lib/roken/getarg.3 b/crypto/heimdal/lib/roken/getarg.3
index 25e2217..e2f0412 100644
--- a/crypto/heimdal/lib/roken/getarg.3
+++ b/crypto/heimdal/lib/roken/getarg.3
@@ -1,5 +1,35 @@
-.\" Copyright (c) 1999 Kungliga Tekniska Högskolan
-.\" $Id: getarg.3,v 1.4 2002/08/20 17:07:29 joda Exp $
+.\" Copyright (c) 1999 - 2002 Kungliga Tekniska Högskolan
+.\" (Royal Institute of Technology, Stockholm, Sweden).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Institute nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: getarg.3,v 1.7 2003/04/16 13:58:24 lha Exp $
.Dd September 24, 1999
.Dt GETARG 3
.Os ROKEN
@@ -8,7 +38,7 @@
.Nm arg_printusage
.Nd collect command line options
.Sh SYNOPSIS
-.Fd #include <getarg.h>
+.In getarg.h
.Ft int
.Fn getarg "struct getargs *args" "size_t num_args" "int argc" "char **argv" "int *optind"
.Ft void
@@ -109,7 +139,7 @@ the argument is a flag, and
should point to a
.Fa int .
It gets filled in with either zero or one, depending on how the option
-is given, the normal case beeing one. Note that if the option isn't
+is given, the normal case being one. Note that if the option isn't
given, the value isn't altered, so it should be initialised to some
useful default.
.It Fa arg_negative_flag
diff --git a/crypto/heimdal/lib/roken/getcap.c b/crypto/heimdal/lib/roken/getcap.c
index 997fabf..8a29e1f 100644
--- a/crypto/heimdal/lib/roken/getcap.c
+++ b/crypto/heimdal/lib/roken/getcap.c
@@ -40,7 +40,7 @@
#include <config.h>
#endif
#include "roken.h"
-RCSID("$Id: getcap.c,v 1.7 1999/11/17 21:11:58 assar Exp $");
+RCSID("$Id: getcap.c,v 1.8 2003/04/16 16:23:36 lha Exp $");
#include <sys/types.h>
#include <ctype.h>
@@ -251,11 +251,12 @@ getent(char **cap, size_t *len, char **db_array, int fd,
* Check if we have a top record from cgetset().
*/
if (depth == 0 && toprec != NULL && cgetmatch(toprec, name) == 0) {
- if ((record = malloc (topreclen + BFRAG)) == NULL) {
+ size_t len = topreclen + BFRAG;
+ if ((record = malloc (len)) == NULL) {
errno = ENOMEM;
return (-2);
}
- (void)strcpy(record, toprec); /* XXX: strcpy is safe */
+ (void)strlcpy(record, toprec, len);
db_p = db_array;
rp = record + topreclen + 1;
r_end = rp + BFRAG;
diff --git a/crypto/heimdal/lib/roken/parse_bytes.c b/crypto/heimdal/lib/roken/parse_bytes.c
index 7793e07..b556ddc 100644
--- a/crypto/heimdal/lib/roken/parse_bytes.c
+++ b/crypto/heimdal/lib/roken/parse_bytes.c
@@ -33,13 +33,13 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: parse_bytes.c,v 1.3 2001/09/04 09:56:00 assar Exp $");
+RCSID("$Id: parse_bytes.c,v 1.4 2003/03/07 15:51:53 lha Exp $");
#endif
#include <parse_units.h>
#include "parse_bytes.h"
-static units bytes_units[] = {
+static struct units bytes_units[] = {
{ "gigabyte", 1024 * 1024 * 1024 },
{ "gbyte", 1024 * 1024 * 1024 },
{ "GB", 1024 * 1024 * 1024 },
@@ -52,7 +52,7 @@ static units bytes_units[] = {
{ NULL, 0 }
};
-static units bytes_short_units[] = {
+static struct units bytes_short_units[] = {
{ "GB", 1024 * 1024 * 1024 },
{ "MB", 1024 * 1024 },
{ "KB", 1024 },
diff --git a/crypto/heimdal/lib/roken/parse_time.c b/crypto/heimdal/lib/roken/parse_time.c
index a09ded7..deab102 100644
--- a/crypto/heimdal/lib/roken/parse_time.c
+++ b/crypto/heimdal/lib/roken/parse_time.c
@@ -33,13 +33,13 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: parse_time.c,v 1.5 1999/12/02 16:58:51 joda Exp $");
+RCSID("$Id: parse_time.c,v 1.6 2003/03/07 15:51:06 lha Exp $");
#endif
#include <parse_units.h>
#include "parse_time.h"
-static units time_units[] = {
+static struct units time_units[] = {
{"year", 365 * 24 * 60 * 60},
{"month", 30 * 24 * 60 * 60},
{"week", 7 * 24 * 60 * 60},
diff --git a/crypto/heimdal/lib/roken/parse_units.h b/crypto/heimdal/lib/roken/parse_units.h
index 29c5779..2002625 100644
--- a/crypto/heimdal/lib/roken/parse_units.h
+++ b/crypto/heimdal/lib/roken/parse_units.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-/* $Id: parse_units.h,v 1.7 2001/09/04 09:56:00 assar Exp $ */
+/* $Id: parse_units.h,v 1.8 2003/04/16 17:30:54 lha Exp $ */
#ifndef __PARSE_UNITS_H__
#define __PARSE_UNITS_H__
@@ -44,8 +44,6 @@ struct units {
unsigned mult;
};
-typedef struct units units;
-
int
parse_units (const char *s, const struct units *units,
const char *def_unit);
diff --git a/crypto/heimdal/lib/roken/resolve.c b/crypto/heimdal/lib/roken/resolve.c
index ddecb98..cdbc069 100644
--- a/crypto/heimdal/lib/roken/resolve.c
+++ b/crypto/heimdal/lib/roken/resolve.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995 - 2002 Kungliga Tekniska Högskolan
+ * Copyright (c) 1995 - 2003 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -45,7 +45,7 @@
#include <assert.h>
-RCSID("$Id: resolve.c,v 1.36.4.1 2002/10/21 14:48:15 joda Exp $");
+RCSID("$Id: resolve.c,v 1.38.2.1 2003/04/22 15:02:47 lha Exp $");
#undef HAVE_RES_NSEARCH
#if (defined(HAVE_RES_SEARCH) || defined(HAVE_RES_NSEARCH)) && defined(HAVE_DN_EXPAND)
@@ -166,6 +166,8 @@ parse_record(const unsigned char *data, const unsigned char *end_data,
break;
case T_MX:
case T_AFSDB:{
+ size_t hostlen;
+
status = dn_expand(data, end_data, p + 2, host, sizeof(host));
if(status < 0){
free(*rr);
@@ -176,17 +178,19 @@ parse_record(const unsigned char *data, const unsigned char *end_data,
return -1;
}
+ hostlen = strlen(host);
(*rr)->u.mx = (struct mx_record*)malloc(sizeof(struct mx_record) +
- strlen(host));
+ hostlen);
if((*rr)->u.mx == NULL) {
free(*rr);
return -1;
}
(*rr)->u.mx->preference = (p[0] << 8) | p[1];
- strcpy((*rr)->u.mx->domain, host);
+ strlcpy((*rr)->u.mx->domain, host, hostlen + 1);
break;
}
case T_SRV:{
+ size_t hostlen;
status = dn_expand(data, end_data, p + 6, host, sizeof(host));
if(status < 0){
free(*rr);
@@ -197,9 +201,10 @@ parse_record(const unsigned char *data, const unsigned char *end_data,
return -1;
}
+ hostlen = strlen(host);
(*rr)->u.srv =
(struct srv_record*)malloc(sizeof(struct srv_record) +
- strlen(host));
+ hostlen);
if((*rr)->u.srv == NULL) {
free(*rr);
return -1;
@@ -207,7 +212,7 @@ parse_record(const unsigned char *data, const unsigned char *end_data,
(*rr)->u.srv->priority = (p[0] << 8) | p[1];
(*rr)->u.srv->weight = (p[2] << 8) | p[3];
(*rr)->u.srv->port = (p[4] << 8) | p[5];
- strcpy((*rr)->u.srv->target, host);
+ strlcpy((*rr)->u.srv->target, host, hostlen + 1);
break;
}
case T_TXT:{
@@ -247,7 +252,7 @@ parse_record(const unsigned char *data, const unsigned char *end_data,
break;
}
case T_SIG : {
- size_t sig_len;
+ size_t sig_len, hostlen;
if(size <= 18) {
free(*rr);
@@ -269,8 +274,9 @@ parse_record(const unsigned char *data, const unsigned char *end_data,
don't you just love C?
*/
sig_len = size - 18 - status;
+ hostlen = strlen(host);
(*rr)->u.sig = malloc(sizeof(*(*rr)->u.sig)
- + strlen(host) + sig_len);
+ + hostlen + sig_len);
if ((*rr)->u.sig == NULL) {
free(*rr);
return -1;
@@ -288,7 +294,7 @@ parse_record(const unsigned char *data, const unsigned char *end_data,
(*rr)->u.sig->sig_len = sig_len;
memcpy ((*rr)->u.sig->sig_data, p + 18 + status, sig_len);
(*rr)->u.sig->signer = &(*rr)->u.sig->sig_data[sig_len];
- strcpy((*rr)->u.sig->signer, host);
+ strlcpy((*rr)->u.sig->signer, host, hostlen + 1);
break;
}
diff --git a/crypto/heimdal/lib/roken/roken.awk b/crypto/heimdal/lib/roken/roken.awk
index b6a181c..1c1e0c0 100644
--- a/crypto/heimdal/lib/roken/roken.awk
+++ b/crypto/heimdal/lib/roken/roken.awk
@@ -1,4 +1,4 @@
-# $Id: roken.awk,v 1.8 2002/09/10 20:05:55 joda Exp $
+# $Id: roken.awk,v 1.9 2003/03/04 10:37:26 lha Exp $
BEGIN {
print "#ifdef HAVE_CONFIG_H"
@@ -6,7 +6,7 @@ BEGIN {
print "#endif"
print "#include <stdio.h>"
print ""
- print "int main()"
+ print "int main(int argc, char **argv)"
print "{"
print "puts(\"/* This is an OS dependent, generated file */\");"
print "puts(\"\\n\");"
diff --git a/crypto/heimdal/lib/roken/snprintf.c b/crypto/heimdal/lib/roken/snprintf.c
index 1a3b7be..5e4b85e9 100644
--- a/crypto/heimdal/lib/roken/snprintf.c
+++ b/crypto/heimdal/lib/roken/snprintf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995-2002 Kungliga Tekniska Högskolan
+ * Copyright (c) 1995-2003 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: snprintf.c,v 1.34 2002/04/18 08:50:57 joda Exp $");
+RCSID("$Id: snprintf.c,v 1.35 2003/03/26 10:05:48 joda Exp $");
#endif
#include <stdio.h>
#include <stdarg.h>
@@ -338,6 +338,8 @@ xyzprintf (struct snprintf_state *state, const char *char_format, va_list ap)
flags |= alternate_flag;
else if(c == '0')
flags |= zero_flag;
+ else if(c == '\'')
+ ; /* just ignore */
else
break;
}
diff --git a/crypto/heimdal/lib/roken/socket.c b/crypto/heimdal/lib/roken/socket.c
index ad124fd..bd67013 100644
--- a/crypto/heimdal/lib/roken/socket.c
+++ b/crypto/heimdal/lib/roken/socket.c
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: socket.c,v 1.7 2001/09/03 12:04:23 joda Exp $");
+RCSID("$Id: socket.c,v 1.8 2003/04/15 03:26:51 lha Exp $");
#endif
#include <roken.h>
@@ -270,7 +270,8 @@ socket_set_tos (int sock, int tos)
{
#if defined(IP_TOS) && defined(HAVE_SETSOCKOPT)
if (setsockopt (sock, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof (int)) < 0)
- warn ("setsockopt TOS (ignored)");
+ if (errno != EINVAL)
+ warn ("setsockopt TOS (ignored)");
#endif
}
diff --git a/crypto/heimdal/lib/roken/strcasecmp.c b/crypto/heimdal/lib/roken/strcasecmp.c
index b5e20e7..cde5b3b 100644
--- a/crypto/heimdal/lib/roken/strcasecmp.c
+++ b/crypto/heimdal/lib/roken/strcasecmp.c
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: strcasecmp.c,v 1.9 1999/12/02 16:58:52 joda Exp $");
+RCSID("$Id: strcasecmp.c,v 1.10 2003/04/14 11:26:27 lha Exp $");
#endif
#include <string.h>
@@ -46,13 +46,13 @@ RCSID("$Id: strcasecmp.c,v 1.9 1999/12/02 16:58:52 joda Exp $");
int
strcasecmp(const char *s1, const char *s2)
{
- while(toupper(*s1) == toupper(*s2)) {
+ while(toupper((unsigned char)*s1) == toupper((unsigned char)*s2)) {
if(*s1 == '\0')
return 0;
s1++;
s2++;
}
- return toupper(*s1) - toupper(*s2);
+ return toupper((unsigned char)*s1) - toupper((unsigned char)*s2);
}
#endif
diff --git a/crypto/heimdal/lib/roken/strlwr.c b/crypto/heimdal/lib/roken/strlwr.c
index cb36789..f2c6a9f 100644
--- a/crypto/heimdal/lib/roken/strlwr.c
+++ b/crypto/heimdal/lib/roken/strlwr.c
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: strlwr.c,v 1.4 1999/12/02 16:58:53 joda Exp $");
+RCSID("$Id: strlwr.c,v 1.5 2003/04/14 11:44:34 lha Exp $");
#endif
#include <string.h>
#include <ctype.h>
@@ -47,7 +47,7 @@ strlwr(char *str)
char *s;
for(s = str; *s; s++)
- *s = tolower(*s);
+ *s = tolower((unsigned char)*s);
return str;
}
#endif
diff --git a/crypto/heimdal/lib/roken/strncasecmp.c b/crypto/heimdal/lib/roken/strncasecmp.c
index 7c6474f..a08d9e8 100644
--- a/crypto/heimdal/lib/roken/strncasecmp.c
+++ b/crypto/heimdal/lib/roken/strncasecmp.c
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: strncasecmp.c,v 1.2 1999/12/02 16:58:53 joda Exp $");
+RCSID("$Id: strncasecmp.c,v 1.3 2003/04/14 11:46:04 lha Exp $");
#endif
#include <string.h>
@@ -45,7 +45,9 @@ RCSID("$Id: strncasecmp.c,v 1.2 1999/12/02 16:58:53 joda Exp $");
int
strncasecmp(const char *s1, const char *s2, size_t n)
{
- while(n > 0 && toupper(*s1) == toupper(*s2)) {
+ while(n > 0
+ && toupper((unsigned char)*s1) == toupper((unsigned char)*s2))
+ {
if(*s1 == '\0')
return 0;
s1++;
@@ -54,7 +56,7 @@ strncasecmp(const char *s1, const char *s2, size_t n)
}
if(n == 0)
return 0;
- return toupper(*s1) - toupper(*s2);
+ return toupper((unsigned char)*s1) - toupper((unsigned char)*s2);
}
#endif
diff --git a/crypto/heimdal/lib/roken/strupr.c b/crypto/heimdal/lib/roken/strupr.c
index 96dd042..9d136e0 100644
--- a/crypto/heimdal/lib/roken/strupr.c
+++ b/crypto/heimdal/lib/roken/strupr.c
@@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: strupr.c,v 1.4 1999/12/02 16:58:53 joda Exp $");
+RCSID("$Id: strupr.c,v 1.5 2003/04/14 11:46:41 lha Exp $");
#endif
#include <string.h>
#include <ctype.h>
@@ -47,7 +47,7 @@ strupr(char *str)
char *s;
for(s = str; *s; s++)
- *s = toupper(*s);
+ *s = toupper((unsigned char)*s);
return str;
}
#endif
OpenPOWER on IntegriCloud