rem: if (fd->ptr > fd->datalen)
add: if (fd->ptr > fd->datalen || fd->datalen == 0)
context: gerb_fgetc(gerb_file_t *fd){    char data;    if (fd->ptr > fd->datalen)	return EOF;    data = fd->data[fd->ptr++];    return data;}