[vlc-commits] vlc_strcasestr(): fix infinite loop an invalid haystack
Rémi Denis-Courmont
git at videolan.org
Sun Mar 25 17:48:46 CEST 2012
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 25 18:46:47 2012 +0300| [adee869ff5c6000fda61358460f30feaf1f63a8c] | committer: Rémi Denis-Courmont
vlc_strcasestr(): fix infinite loop an invalid haystack
Pointed-out-by: Edward Wang <edward.c.wang at compdigitec.com>
(cherry picked from commit baada5eddfe86431037950fda5c27812ea9dacca)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=adee869ff5c6000fda61358460f30feaf1f63a8c
---
src/text/unicode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/text/unicode.c b/src/text/unicode.c
index 4dd95b3..0f04218 100644
--- a/src/text/unicode.c
+++ b/src/text/unicode.c
@@ -336,7 +336,7 @@ char *vlc_strcasestr (const char *haystack, const char *needle)
s = vlc_towc (haystack, &(uint32_t) { 0 });
haystack += s;
}
- while (s != 0);
+ while (s > 0);
return NULL;
}
More information about the vlc-commits
mailing list