Merge "diag: Fix support for resizing buffers used in reading smd data"