Hi! Thanks for the report. This is, however, a bug in the example
program. strcasecmp expects a string to be null terminated. Since the
buffer is unterminated, strcasecmp runs off the end of the buffer. Try
using cmalloc(1, 4001) instead of malloc, or manually terminating the
buffer, or using strncasecmp("hello", data, 4000). (You should also
check the return value of fread()) I hope that helps!

** Changed in: ubuntu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/807154

Title:
  libc has buffer overflow with strcasestr

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/807154/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to