Fix malloc size and test workflow