Skip to content

Commit

Permalink
vis-digraph: properly initialize local variable
Browse files Browse the repository at this point in the history
Fixes CID 141180
  • Loading branch information
martanne committed Feb 8, 2017
1 parent 0ff3fce commit e43a3f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vis-digraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ int main(int argc, char *argv[]) {

if (strcmp(argv[1], "-") == 0) {
setup();
char name[MAX_DIGRAPH_LENGTH+1];
char name[MAX_DIGRAPH_LENGTH+1] = "";
for (size_t i = 0; i < sizeof(name)-1; i++) {
ssize_t r = readc(name+i);
if (r == -1) {
Expand Down

0 comments on commit e43a3f6

Please sign in to comment.