Skip to content

Commit

Permalink
Merge pull request #90 from knnniggett/patch-8
Browse files Browse the repository at this point in the history
zms crashes with hashed authentication - fixes #88

Previously, systems without gnutls were computing auth_md5 to be twice the size of what it was defined to be, thus causing zms to crash. The for loop at line 227 builds auth_md5 by looping every "2j", which means the upper limit (md5len) should be half the desired size of auth_md5.
  • Loading branch information
kylejohnson committed Aug 28, 2013
2 parents a33ddcb + 4e9698a commit 396dedc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zm_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ User *zmLoadAuthUser( const char *auth, bool use_remote_addr )

char auth_key[512] = "";
char auth_md5[32+1] = "";
size_t md5len = 32;
size_t md5len = 16;
unsigned char md5sum[md5len];

time_t now = time( 0 );
Expand Down

0 comments on commit 396dedc

Please sign in to comment.