diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-26 09:04:01 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-26 09:04:01 +0000 |
commit | 86cc59ae41d6a987793823e00873fd47bf39ed71 (patch) | |
tree | e39b0e53997de3a845e680e235b615e25f425728 | |
parent | [w3m-dev 02555] (diff) | |
download | w3m-86cc59ae41d6a987793823e00873fd47bf39ed71.tar.gz w3m-86cc59ae41d6a987793823e00873fd47bf39ed71.zip |
[w3m-dev 02556]
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | indep.c | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,8 @@ 2001-11-26 Fumitoshi UKAI <ukai@debian.or.jp> + * [w3m-dev 02556] + * indep.c (strcasestr): strcasestr("", "") should not return NULL + * [w3m-dev 02555] * configure: check strcasestr * fm.h (_GNU_SOURCE): requires for strcasestr() @@ -1,4 +1,4 @@ -/* $Id: indep.c,v 1.10 2001/11/26 09:01:08 ukai Exp $ */ +/* $Id: indep.c,v 1.11 2001/11/26 09:04:01 ukai Exp $ */ #include "fm.h" #include <stdio.h> #include <pwd.h> @@ -177,6 +177,8 @@ strcasestr(const char *s1, const char *s2) int len1, len2; if (s2 == NULL) return (char *)s1; + if (*s2 == '\0') + return (char *)s1; len1 = strlen(s1); len2 = strlen(s2); while (*s1 && len1 >= len2) { |