radmin2: cast calloc output (found by ccc-analyzer).

This commit is contained in:
Dario Lombardo 2017-08-18 21:41:00 +02:00
parent 82be691b9d
commit 8c42e0007b

View file

@ -86,7 +86,7 @@ char *message2buffer(struct rmessage *msg) {
switch(msg->type) {
case 0x1b: //Challenge request
data = calloc (10, sizeof(unsigned char));
data = (char *)calloc (10, sizeof(char));
if(data == NULL) {
hydra_report(stderr, "calloc failure\n");
hydra_child_exit(0);
@ -97,7 +97,7 @@ char *message2buffer(struct rmessage *msg) {
memcpy((data+9), &msg->type, sizeof(char));
break;
case 0x09:
data = calloc (42, sizeof(unsigned char));
data = (char *)calloc (42, sizeof(char));
if(data == NULL) {
hydra_report(stderr, "calloc failure\n");
hydra_child_exit(0);