/* pad with empty bytes */
pad_size = PAGE_ALIGN(valid_length)-valid_length;
if(pad_size) {
tmp = malloc(pad_size);
memset(tmp, 0, pad_size);
/* pad with empty bytes */
pad_size = PAGE_ALIGN(valid_length)-valid_length;
if(pad_size) {
tmp = malloc(pad_size);
memset(tmp, 0, pad_size);