hesiod/hesiod-3.1.0-str.patch

26 lines
792 B
Diff

One or both strings is supplied through a configuration file, so we have no
guarantees about its length.
--- hesiod-3.1.0/hesservbyname.c 2006-03-30 11:22:11.000000000 -0500
+++ hesiod-3.1.0/hesservbyname.c 2006-03-30 13:13:50.000000000 -0500
@@ -187,7 +187,7 @@
static int cistrcmp(const char *s1, const char *s2)
{
- while (*s1 && tolower(*s1) == tolower(*s2))
+ while (*s1 && *s2 && tolower(*s1) == tolower(*s2))
{
s1++;
s2++;
--- hesiod-3.1.0/hesiod.c 2006-03-30 13:13:50.000000000 -0500
+++ hesiod-3.1.0/hesiod.c 2006-03-30 13:19:03.000000000 -0500
@@ -465,7 +465,7 @@
static int cistrcmp(const char *s1, const char *s2)
{
- while (*s1 && tolower(*s1) == tolower(*s2))
+ while (*s1 && *s2 && tolower(*s1) == tolower(*s2))
{
s1++;
s2++;