Skip to content

Commit

Permalink
Update zoo_service_loader.c
Browse files Browse the repository at this point in the history
base64 fix
  • Loading branch information
t2rdirienzo authored Nov 6, 2020
1 parent 704cc7a commit c94177f
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,15 @@ addUserToMap(maps* conf){
VERIFY_SIGNATURE=tmpP+1;
int bufferLen=0;

size_t nPAYLOAD=(strlen(PAYLOAD)+2)*sizeof (char);
size_t nPAYLOAD=(strlen(PAYLOAD)+100)*sizeof (char);
char* cPAYLOAD=(char*)malloc(nPAYLOAD);
memset(cPAYLOAD,'\0',nPAYLOAD);
memcpy(cPAYLOAD,PAYLOAD,(strlen(PAYLOAD))*sizeof (char));
*(cPAYLOAD+strlen(PAYLOAD)) = '=';
memcpy(cPAYLOAD,PAYLOAD,(strlen(PAYLOAD))*sizeof (char));
int theUg=(4 - strlen(PAYLOAD) % 4);
if (theUg)
for (int rt=0;rt<theUg;rt++ ){
*(cPAYLOAD+strlen(PAYLOAD)+rt) = '=';
}

unsigned char* buffer=NULL;
size_t theLen=0;
Expand Down

0 comments on commit c94177f

Please sign in to comment.