Lines 27-42
Link Here
|
27 |
static char rcsid[] = "@(#)$Id: p_blowfish.c,v 1.3 2005/06/04 18:00:14 hisi Exp $"; |
27 |
static char rcsid[] = "@(#)$Id: p_blowfish.c,v 1.3 2005/06/04 18:00:14 hisi Exp $"; |
28 |
#endif |
28 |
#endif |
29 |
|
29 |
|
|
|
30 |
#include <p_global.h> |
31 |
/* |
30 |
#include <stdio.h> |
32 |
#include <stdio.h> |
31 |
#include <string.h> |
33 |
#include <string.h> |
32 |
#include <config.h> |
34 |
#include <config.h> |
33 |
|
35 |
|
34 |
char *strmncpy(char *dest, char *source, size_t len); |
36 |
char *strmncpy(char *dest, char *source, size_t len); |
35 |
char *lngtxt(int msgnum); |
37 |
char *lngtxt(int msgnum); |
|
|
38 |
*/ |
36 |
|
39 |
|
|
|
40 |
/* |
37 |
#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; } |
41 |
#define pcontext { strmncpy(ctxt,__FILE__,sizeof(ctxt));strmncpy(cfunc,__FUNCTION__,sizeof(cfunc)); cline=__LINE__; } |
38 |
#define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__) |
42 |
#define pmalloc(n) __pmalloc((n),__FILE__,__FUNCTION__,__LINE__) |
39 |
#define free(n) _pfree(n,__FILE__,__FUNCTION__,__LINE__) |
43 |
#define free(n) _pfree(n,__FILE__,__FUNCTION__,__LINE__) |
|
|
44 |
*/ |
40 |
|
45 |
|
41 |
unsigned char *hashstring(unsigned char *str,int len); |
46 |
unsigned char *hashstring(unsigned char *str,int len); |
42 |
unsigned char *unhashstring(unsigned char *str); |
47 |
unsigned char *unhashstring(unsigned char *str); |
Lines 478-487
Link Here
|
478 |
char *p, *s, *dest, *d, *pt; |
483 |
char *p, *s, *dest, *d, *pt; |
479 |
char rim[5],ep[5],rep[5]; |
484 |
char rim[5],ep[5],rep[5]; |
480 |
int i; |
485 |
int i; |
481 |
dest = (char *) pmalloc((strlen(str) + 9) * 2); |
486 |
dest = __pmalloc((strlen(str) + 9) * 2, "p_blowfish.c", "BLOWencrypt", 481); |
|
|
487 |
dest = pmalloc((strlen(str) + 9) * 2); |
482 |
*dest=0; |
488 |
*dest=0; |
483 |
/* pad fake string with 8 bytes to make sure there's enough */ |
489 |
/* pad fake string with 8 bytes to make sure there's enough */ |
484 |
s = (char *) pmalloc(strlen(str) + 9); |
490 |
s = pmalloc(strlen(str) + 9); |
485 |
strcpy(s, str); |
491 |
strcpy(s, str); |
486 |
p = s; |
492 |
p = s; |
487 |
while (*p) |
493 |
while (*p) |