Livy characterizes Hannibal as possessing an equal mix of extreme virtue and extreme vice. In line with ancient Greco-Roman values, Hannibal is described as someone who lived a life of moderation and self-control, to whom luxury and opulence held little interest. He was brave, someone who could maintain his composure in the chaos of battle. However, at the same time, Livy claims he was also cruel, dishonest and impious, with no respect for religion or oaths.
Ultimately, I think much of the reason for this characterization can be found in Hannibal's significance in Roman history. Hannibal was the greatest of Rome's opponents, the enemy who invaded Italy itself and laid siege to Rome. He handed the Romans perhaps the most crushing defeat they would ever suffer at the Battle of Cannae. With this in mind, Hannibal's invasion of Italy in the Second Punic War would have been a time of severe crisis to the Roman Republic.
Both his virtues and his vices (as Livy depicts them) reflect this history and role: Hannibal is cruel and untrustworthy, but while they detract from his character, they do not detract from his ability to wage war. In this respect, as terrible as the Romans might have viewed him, he also emerges as a kind of worthy opponent, because (in the Roman mindset) one should expect that only a special kind of personality should be able to oppose Rome to such a fearsome degree, and this, furthermore, grants the Romans themselves a greater share of honor for eventually defeating so fearsome an opponent. In this way, Rome's power and reputation are themselves intertwined with Hannibal's own, requiring Hannibal take on the suitable characteristics to fit this role.
With that in mind, I don't think this characterization is trustworthy. Remember, the Second Punic War had concluded long, long before Livy was even born, and as stated above, the ideological components and propaganda value observed in this characterization are so striking that they must be accounted for, and should not be accepted at face value as representing Hannibal's true personality and character.