bugfix:handle vsnprintf fail.