Changeset 34759e6
- Timestamp:
- 2005-12-10T15:28:41Z (19 years ago)
- Branches:
- master
- Children:
- 1aa0bb5, d3307e2
- Parents:
- 9df916f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
crypting.c
r9df916f r34759e6 108 108 } 109 109 110 char *obfucrypt (irc_t *irc, char *line) { 110 char *obfucrypt (irc_t *irc, char *line) 111 { 111 112 int i, j; 112 113 char *rv; … … 114 115 if (irc->password == NULL) return (NULL); 115 116 116 rv = (char *)g_malloc (strlen (line) + 1); 117 memset (rv, '\0', strlen (line) + 1); 117 rv = g_new0(char, strlen (line) + 1); 118 118 119 119 i = j = 0; … … 133 133 } 134 134 135 char *deobfucrypt (irc_t *irc, char *line) { 135 char *deobfucrypt (irc_t *irc, char *line) 136 { 136 137 int i, j; 137 138 char *rv; … … 139 140 if (irc->password == NULL) return (NULL); 140 141 141 rv = (char *)g_malloc (strlen (line) + 1); 142 memset (rv, '\0', strlen (line) + 1); 142 rv = g_new0(char, strlen (line) + 1); 143 143 144 144 i = j = 0; … … 162 162 int main( int argc, char *argv[] ) 163 163 { 164 irc_t *irc = g_ malloc( sizeof( irc_t ));164 irc_t *irc = g_new0( irc_t, 1 ); 165 165 char *hash, *action, line[256]; 166 166 char* (*func)( irc_t *, char * ); … … 174 174 } 175 175 176 memset( irc, 0, sizeof( irc_t ) );177 176 irc->password = g_strdup( argv[1] ); 178 177
Note: See TracChangeset
for help on using the changeset viewer.