Bugzilla – Attachment #40167: shorter patch with just the ppos hunk for bug #94160
{
int error;
if (*ppos > buffer->count)
return 0;
if (count > (buffer->count - *ppos))
count = buffer->count - *ppos;