fix cliprdr bug

fix a memory realloc size bug.
reformat coding styles.