fix clang static analyzer warnings/errors - see #217

This commit is contained in:
Karel Miko
2017-05-11 20:37:06 +02:00
parent 08cc78007b
commit 43e46a2efc
7 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ int ccm_memory(int cipher,
}
/* initialize buffer for pt */
if (direction == CCM_DECRYPT) {
if (direction == CCM_DECRYPT && ptlen > 0) {
pt_work = XMALLOC(ptlen);
if (pt_work == NULL) {
goto error;