svm: fix svmtool and svmdbtool segment fault.