chewing/libchewing — pull request #11 by naota (2012-10-04 10:46:07+00:00)
Title: Fix possible strncat() overflow

strncat(dst, src, n) use at most n bytes from src.

man strncat say:

If src contains n or more bytes, strncat() writes n+1 bytes to dest (n from src plus the terminating null byte). Therefore, the size of dest must be at least strlen(dest)+n+1.

So we need to have "buf_len - strlen(buf) - 1"