OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains4x.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06d93d0
)
* libc/memmem.cc (memmem): Fix bug when searching for empty string.
author
corinna
<corinna>
Thu, 20 Dec 2007 10:11:37 +0000
(10:11 +0000)
committer
corinna
<corinna>
Thu, 20 Dec 2007 10:11:37 +0000
(10:11 +0000)
winsup/cygwin/ChangeLog
patch
|
blob
|
history
winsup/cygwin/libc/memmem.cc
patch
|
blob
|
history
diff --git
a/winsup/cygwin/ChangeLog
b/winsup/cygwin/ChangeLog
index
fdd0298
..
afa9c9e
100644
(file)
--- a/
winsup/cygwin/ChangeLog
+++ b/
winsup/cygwin/ChangeLog
@@
-1,3
+1,7
@@
+2007-12-20 Eric Blake <ebb9@byu.net>
+
+ * libc/memmem.cc (memmem): Fix bug when searching for empty string.
+
2007-12-19 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcpcpy, wcpncpy.
diff --git
a/winsup/cygwin/libc/memmem.cc
b/winsup/cygwin/libc/memmem.cc
index
cd9dc33
..
142b733
100644
(file)
--- a/
winsup/cygwin/libc/memmem.cc
+++ b/
winsup/cygwin/libc/memmem.cc
@@
-45,8
+45,8
@@
memmem (const void *l, size_t l_len,
const char *cs = (const char *)s;
/* we need something to compare */
- if (
l_len == 0 ||
s_len == 0)
- return
NULL
;
+ if (s_len == 0)
+ return
(void *) l
;
/* "s" must be smaller or equal to "l" */
if (l_len < s_len)