/* Copyright (c) 2007-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "memarea.h"
#include "istream-private.h"
#include "test-common.h"
struct test_istream {
const void *orig_buffer;
unsigned int skip_diff;
bool allow_eof;
};
{
}
{
unsigned int new_skip_diff;
return -2;
}
/* we seeked past the end of file. */
ret = 0;
} else {
/* copy data to a buffer in somewhat random place. this could
help catch bugs. */
/* Reallocate the memory area if needed. Use exactly correct
buffer size so valgrind can catch read overflows. If a
correctly sized memarea already exists, use it only if
its refcount is 1. Otherwise with refcount>1 we could be
moving data within an existing memarea, which breaks
snapshots. */
}
if (size > 0)
}
if (ret > 0)
return ret;
return 0;
else {
return -1;
}
}
bool mark ATTR_UNUSED)
{
}
{
}
{
}
{
}
}
{
}
{
}
{
}