fix length check in read_section_debug()

fix #1572