s3: reduced too greedy stack requirement for buffers causing segfault