Commit 9c70c71ce4c650bb8b521a70d18dd3f4e1e69ae8
1 parent
89adc137
Exists in
master
Fix buffer init
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/SERVER/DD_Access_sr.c
... | ... | @@ -250,7 +250,8 @@ int CheckTicket(char *NameUsr, char *Ticket) |
250 | 250 | DD_id = i; |
251 | 251 | Ticket[strlen(Ticket)]='\0'; |
252 | 252 | NameUsr[strlen(NameUsr)]='\0'; |
253 | - newkey[PasswdLength-1]='\0'; | |
253 | + memset(newkey, 0, PasswdLength*sizeof(char)); | |
254 | + | |
254 | 255 | |
255 | 256 | strncpy(salt,PasChar,2); |
256 | 257 | |
... | ... | @@ -263,7 +264,7 @@ int CheckTicket(char *NameUsr, char *Ticket) |
263 | 264 | } |
264 | 265 | else |
265 | 266 | { |
266 | - if(Verbose) fprintf(stderr,"for user %s permission denied.\n",NameUsr); | |
267 | + if(Verbose) fprintf(stderr,"for user %s permission denied .\n",NameUsr); | |
267 | 268 | Right = NOPERMISSION; |
268 | 269 | } |
269 | 270 | break; | ... | ... |