Permalink
Browse files

processArguments.c: Bugfix. Changed two 'malloc's to 'calloc' because…

… there was a null check on uninitialized values. This occurred when checking if an item was part of a black- or whitelist.
  • Loading branch information...
1 parent 4c3bf1d commit 0c93941f69aef5fbc6c4716bf8bb90d129c8e3bd @TacoSteemers committed Oct 12, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 code/processArguments.c
View
4 code/processArguments.c
@@ -31,8 +31,8 @@ void initializeArgumentProcessing()
signalTarget = "--target";
signalBlacklist = "--blacklist";
signalWhitelist = "--whitelist";
- gBlacklist = malloc(MAXLISTLENGTH);
- gWhitelist = malloc(MAXLISTLENGTH);
+ gBlacklist = calloc(MAXLISTLENGTH, MAXIDLENGTH);
+ gWhitelist = calloc(MAXLISTLENGTH, MAXIDLENGTH);
gNotificationSetting = NONOTIFICATIONS;
signalNotificationSetting = "--notification";

0 comments on commit 0c93941

Please sign in to comment.