I think you forgot here that output stock_name(9 bytes) is bigger than input one(8 bytes).