Skip to content

Commit

Permalink
Merge pull request #288 from libtom/pr/fix-tv_gen-scan-build
Browse files Browse the repository at this point in the history
Fix scan-build bug/warning in tv_gen - related to #287
  • Loading branch information
karel-m authored Sep 14, 2017
2 parents 5e71849 + 3ddb45a commit 04cc6cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demos/tv_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,10 @@ void ccm_gen(void)
printf("Error CCM'ing: %s\n", error_to_string(err));
exit(EXIT_FAILURE);
}
if (len == 0) {
printf("Error CCM'ing: zero length\n");
exit(EXIT_FAILURE);
}
fprintf(out, "%3d: ", y1);
for (z = 0; z < y1; z++) {
fprintf(out, "%02X", plaintext[z]);
Expand Down

0 comments on commit 04cc6cc

Please sign in to comment.