How to apply convolution on a buffer
Output the first M samples of your convolution result
Keep the remaining samples and ADD those to the result next buffer


Google "overlap add" for more information. While overlap add is a frequency domain method, it explains the framing and buffer handling well.