diff
20 		while (i < sizeof(buf) && (pg - page < len) &&
---
20 		while (i < bufsize && (pg - page < len) &&
