Mercurial > trustbridge
comparison ui/sslhelp.cpp @ 475:6c4f526a4c5b
Fix off by one error
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 24 Apr 2014 09:41:42 +0000 |
parents | f9b0014cff97 |
children | c8a6a3e6bdeb |
comparison
equal
deleted
inserted
replaced
474:bcae22d57e67 | 475:6c4f526a4c5b |
---|---|
16 | 16 |
17 QString getPolarSSLErrorMsg(int ret) | 17 QString getPolarSSLErrorMsg(int ret) |
18 { | 18 { |
19 char errbuf[1020]; | 19 char errbuf[1020]; |
20 polarssl_strerror(ret, errbuf, 1020); | 20 polarssl_strerror(ret, errbuf, 1020); |
21 errbuf[1020] = '\0'; /* Just to be sure */ | 21 errbuf[1019] = '\0'; /* Just to be sure */ |
22 return QString::fromLatin1(errbuf); | 22 return QString::fromLatin1(errbuf); |
23 } | 23 } |
24 | 24 |
25 QByteArray sha256sum(const QByteArray& data) | 25 QByteArray sha256sum(const QByteArray& data) |
26 { | 26 { |