[gq-commit] gq/src dt_password.c,1.15,1.16
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2003-10-11 07:07:44
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv1999 Modified Files: dt_password.c Log Message: * Got rid of old commented-out code while checking for strcpy occurrences all over the place Index: dt_password.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_password.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** dt_password.c 2 Oct 2003 16:16:25 -0000 1.15 --- dt_password.c 11 Oct 2003 07:07:40 -0000 1.16 *************** *** 124,129 **** unsigned char *password, rand[16], cryptbuf[32]; - /* gb = g_byte_array_set_size(gb, 64); */ - password = (char*) g_malloc((len + 1) * sizeof(char)); memcpy(password, data, len); --- 124,127 ---- *************** *** 139,146 **** g_byte_array_append(gb, "{CRYPT}", 7); - - /* strcpy(gb->data, "{crypt}"); */ des_fcrypt(password, salt->str, cryptbuf); ! /* gb->data + strlen(gb->data)); */ g_byte_array_append(gb, cryptbuf, strlen(cryptbuf)); --- 137,142 ---- g_byte_array_append(gb, "{CRYPT}", 7); des_fcrypt(password, salt->str, cryptbuf); ! g_byte_array_append(gb, cryptbuf, strlen(cryptbuf)); *************** *** 164,174 **** g_byte_array_append(gb, b64->str, strlen(b64->str)); - /* gb = g_byte_array_set_size(gb, MD5_DIGEST_LENGTH + 10); */ - - /* strcpy(gb->data, "{MD5}"); */ - /* strcat(gb->data, b64->str); */ - - /* g_byte_array_set_size(gb, strlen(gb->data)); */ - g_string_free(b64, TRUE); --- 160,163 ---- *************** *** 186,195 **** b64_encode(b64, sha_out, SHA_DIGEST_LENGTH); - /* gb = g_byte_array_set_size(gb, SHA_DIGEST_LENGTH + 10); */ - - /* strcpy(gb->data, "{SHA}"); */ - /* strcat(gb->data, b64->str); */ - - /* g_byte_array_set_size(gb, strlen(gb->data)); */ g_byte_array_append(gb, "{SHA}", 5); g_byte_array_append(gb, b64->str, strlen(b64->str)); --- 175,178 ---- *************** *** 220,230 **** b64_encode(b64, sha_out, sizeof(sha_out)); - /* gb = g_byte_array_set_size(gb, SHA_DIGEST_LENGTH + 16); */ - - /* strcpy(gb->data, "{SSHA}"); */ - /* strcat(gb->data, b64->str); */ - - /* g_byte_array_set_size(gb, strlen(gb->data)); */ - g_byte_array_append(gb, "{SSHA}", 6); g_byte_array_append(gb, b64->str, strlen(b64->str)); --- 203,206 ---- *************** *** 254,263 **** b64_encode(b64, md5_out, sizeof(md5_out)); - /* gb = g_byte_array_set_size(gb, MD5_DIGEST_LENGTH + 16); */ - - /* strcpy(gb->data, "{SMD5}"); */ - /* strcat(gb->data, b64->str); */ - - /* g_byte_array_set_size(gb, strlen(gb->data)); */ g_byte_array_append(gb, "{SMD5}", 6); g_byte_array_append(gb, b64->str, strlen(b64->str)); --- 230,233 ---- *************** *** 458,467 **** g_free(crypt_type); } - - /* printf("getting orgtext '%s' text '%s' orglen=%d len1=%d len2=%d\n", */ - /* content, */ - /* copy->data, */ - /* strlen(content), */ - /* copy->len, strlen(copy->data)); */ return data; --- 428,431 ---- |