fix Issue 10735 - Buffer overflow bug in symbol_generate()

fix http://d.puremagic.com/issues/show_bug.cgi?id=10735