Summary: We get the `strlen` to know how much memory to allocate here, but it wasn't taking into account if the padding was larger than the string itself. This patch sets it to an empty string so we always add the minimum size. This implementation is slightly wasteful with memory, but I am not concerned with a few extra bytes here and there for some memory that gets immediately free'd.