Skip to content

Commit 2e4d1ee

Browse files
committed
chg: [pibs] force null byte for filename
1 parent 459102f commit 2e4d1ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bin/pibs-BGP-Ranking.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ int main(int argc, char* argv[])
7575
break;
7676
case 'r':
7777
strncpy(pibs->filename, optarg, FILENAME_MAX);
78+
pibs->filename[FILENAME_MAX-1] = '\0';
7879
break;
7980
}
8081
}

0 commit comments

Comments
 (0)