A stack-based buffer overflow existed in cscope's putstring function in cscope's versions prior to 15.6. A long function or symbol name in source code file could result in cscope crash or code execution when searching the source code for any function or symbol name.
Issue was originally reported via bug #189666, it can be reproduced using memcheck/tests/match-overrun.c from valgrind source tarball.
In cscope 15.6, putstring was replaced with function fetch_string_from_dbase, which accepts target buffer size as its argument.
Patch, which was used in Fedora cscope packages and is used in cscope packages in Red Hat Enterprise Linux 5:
Common Vulnerabilities and Exposures assigned the identifier CVE-2009-1577 to this vulnerability.
This issue has been addressed in following products:
Red Hat Enterprise Linux 4
Red Hat Enterprise Linux 3
Via RHSA-2009:1101 https://rhn.redhat.com/errata/RHSA-2009-1101.html